English: A screenshot showing matplotlib plots of a polar bar graph resembling the matplotlib logo (upper left), a 3D surface graph with the new default 'viridis' colormap (lower left), a graph of 2D random walk trajectories (lower right), and the python source code (of the logo part) opened in a text editor (upper right).
The matplotlib (mpl) version is the development branch 2.x, with Python 2.7.11 and numpy 1.11.1
############ Code for the mpl logo figure##########importmatplotlib.pyplotaspltimportnumpyasnpfrommatplotlib.cmimportjetascolormapfrommatplotlib.tickerimportNullFormatter,MultipleLocatort,w,r=zip((0.1,0.4,1),(0.9,0.3,5),(1.7,0.5,7),(2.7,0.6,6),(3.5,0.3,3),(4.5,0.4,4),(5.3,0.3,7))fig,ax=plt.subplots(subplot_kw={'polar':True})bars=ax.bar(t,r,width=w,bottom=0.0,lw=2,edgecolor='Black',zorder=2)forr,barinzip(r,bars):bar.set_facecolor(colormap(r/9.0))bar.set_alpha(0.7)ax.yaxis.set_major_locator(MultipleLocator(2))foraxisin(ax.xaxis,ax.yaxis):axis.set_major_formatter(NullFormatter())# no tick labelsax.set_ylim([0,8])ax.grid(True)plt.show()####################
############ Code for the 3D surface plot and the 2D random walk tajectories##########importmatplotlib.pyplotaspltimportnumpyasnpfrommpl_toolkits.mplot3dimportAxes3Dfrommatplotlib.cmimportviridisascolormap"""Figure 1: a 3D surface plot (from matplotlib gallery)"""step=0.04maxval=1.0fig1=plt.figure("Figure_1")ax1=fig1.add_subplot(111,projection='3d')# Create supporting points in polar coordinatesr=np.linspace(0,1.2,50)p=np.linspace(0,2*np.pi,50)R,P=np.meshgrid(r,p)# Transform them to cartesian systemX,Y=R*np.cos(P),R*np.sin(P)Z=((R**2-1)**2)ax1.plot_surface(X,Y,Z,rstride=1,cstride=1,cmap=colormap)ax1.set_zlim3d(0,1)ax1.set_xlabel(r'$\phi_\mathrm{real}$')ax1.set_ylabel(r'$\phi_\mathrm{im}$')ax1.set_zlabel(r'$V(\phi)$')"""Figure 2: a few examples of 2D random walk"""fig2,ax2=plt.subplots(num="Figure_2")prng=np.random.RandomState(123)x=np.linspace(0,10,101)defrandom_walk(xy0=(0.0,0.0),nsteps=100,std=1.0):xy=np.zeros((nsteps+1,2))xy[0,:]=xy0deltas=prng.normal(loc=0.0,scale=std,size=(nsteps,2))xy[1:,:]=xy[0,:]+np.cumsum(deltas,axis=0)returnxyforcntinrange(3):traj=random_walk()ax2.plot(traj[:,0],traj[:,1],label="Traj. {c}".format(c=cnt))ax2.legend(loc='best')plt.show()####################
লাইসেন্স প্রদান
আমি, এই কাজের স্বত্বাধিকারী, এতদ্দ্বারা আমি এই কাজকে নিম্ন বর্ণিত লাইসেন্সের আওতায় প্রকাশ করলাম:
বণ্টন করতে পারেন – এ কাজটি অনুলিপি, বিতরণ এবং প্রেরণ করতে পারেন
পুনঃমিশ্রণ করতে পারেন – কাজটি অভিযোজন করতে পারেন
নিম্নের শর্তাবলীর ভিত্তিতে:
স্বীকৃতিপ্রদান – আপনাকে অবশ্যই যথাযথ স্বীকৃতি প্রদান করতে হবে, লাইসেন্সের একটি লিঙ্ক সরবরাহ করতে হবে এবং কোনো পরিবর্তন হয়েছে কিনা তা নির্দেশ করতে হবে। আপনি যেকোনো যুক্তিসঙ্গত পদ্ধতিতে এটি করতে পারেন। কিন্তু এমন ভাবে নয়, যাতে প্রকাশ পায় যে লাইসেন্সধারী আপনাকে বা আপনার এই ব্যবহারের জন্য অনুমোদন দিয়েছে।
একইভাবে বণ্টন – আপনি যদি কাজটি পুনঃমিশ্রণ, রুপান্তর, বা এর ওপর ভিত্তি করে নতুন সৃষ্টিকর্ম তৈরি করেন, তবে আপনাকে অবশ্যই আপনার অবদান একই লাইসেন্স বা একই রকমের লাইসেন্সের আওতায় বিতরণ করতে হবে।
এই ফাইলে অতিরিক্ত কিছু তথ্য আছে। সম্ভবত যে ডিজিটাল ক্যামেরা বা স্ক্যানারের মাধ্যমে এটি তৈরি বা ডিজিটায়িত করা হয়েছিল, সেটি কর্তৃক তথ্যগুলি যুক্ত হয়েছে। যদি ফাইলটি তার আদি অবস্থা থেকে পরিবর্তিত হয়ে থাকে, কিছু কিছু বিবরণ পরিবর্তিত ফাইলটির জন্য প্রযোজ্য না-ও হতে পারে।