Re: [Matplotlib-users] Visulization of orthogonal grid
Dear Eric, Thanks for your nice answer. Exactly what I need. Best regards, Jiacong Huang -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Visulization-of-orthogonal-grid-tp45473p45476.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Visulization of orthogonal grid
On 2015/05/05 6:03 PM, GoogleWind wrote: Dear all, Matplotlib currently support the visuliaztion of triangular mesh and square-cell map. Is there any solutions to support the visulization of orthogonal grid as follows, http://matplotlib.1069221.n5.nabble.com/file/n45473/%E6%8D%95%E8%8E%B7.png Does pcolormesh do what you need? http://matplotlib.org/examples/pylab_examples/quadmesh_demo.html http://matplotlib.org/api/pyplot_api.html?highlight=pcolormesh#matplotlib.pyplot.pcolormesh Eric Thanks in advances for your hints. Best regards, Jiacong Huang --- Nanjing Institute of Geography Limnology Chinese Academy of Sciences 73 East Beijing Road, Nanjing 210008, China Tel./Fax: +86-25-86882127 Homepage: http://www.escience.cn/people/elake/index.html -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Visulization-of-orthogonal-grid-tp45473.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] issue with wireframe-plot
Hi. I am using matplotlib to plot a wireframe over a 3D list data I have. X = [2.06, 2.07, 2.14, 2.09, 2.2, 2.05, 1.92, 2.06, 2.11, 2.07, 2.15, 2.29, 2.06, 2.09, 2.19, 2.19, 2.26, 2.15, 2.15, 2.06, 2.29, 2.27, 2.46, 2.2, 2.01, 2.11, 2.03, 2.1, 2.17, 2.1] Y = [171.82, 170.8, 159.59, 164.28, 169.98, 162.23, 167.37, 173.81, 166.66, 155.13, 156.56, 156.78, 158.15, 163.31, 150.97, 133.91, 142.36, 152.48, 138.6, 153.88, 155.13, 146.09, 147.84, 167.9, 161.82, 168.39, 163.73, 164.03, 169.33, 159.42] Z = [-1.41173660883, -1.26977354468, -1.07436015752, -1.07522326036, -1.46114949754, -0.955999769503, -0.0826570511052, -1.25171489428, -1.2005961876, -0.862264432276, -1.27266152624, -1.55152901892, -0.93658603, -1.2470594709, 0.40793102312, -1.5375122067, -1.02404937182, -1.38113558714, -0.842054259969, -0.908694881796, -1.57965851609, -1.35631827259, -2.0568110654, -0.783657274668, -0.329844805297, -1.37033049146, -0.853410578988, -1.47048937914, -1.65570962873, -1.21419612238] I am trying to plot it using: ` *data = np.c_[cumualtive_dist,cumulative_ang,cumulative_energ] # regular grid covering the domain of the data... mn = np.min(data, axis=0) mx = np.max(data, axis=0) X,Y = np.meshgrid(np.linspace(mn[0], mx[0], 50), np.linspace(mn[1], mx[1], 50)) XX = X.flatten() YY = Y.flatten() # best-fit quadratic curve A = np.c_[np.ones(data.shape[0]), data[:,:2], np.prod(data[:,:2], axis=1), data[:,:2]**2] C,_,_,_ = scipy.linalg.lstsq(A, data[:,2]) # evaluate it on a grid Z = np.dot(np.c_[np.ones(XX.shape), XX, YY, XX*YY, XX**2, YY**2], C).reshape(X.shape) # Plot scatter-points and fitted 3D surface #- fig3 = plt.figure(figsize=(10,6)) ax3 = fig3.gca(projection='3d') surf = ax3.plot_surface(X, Y, Z, rstride=1, cstride=1, alpha=0.5, cmap=cm.jet) #Adding a color-bar... fig3.colorbar(surf, shrink=0.6, aspect=6) #ax3.plot_wireframe(X, Y, Z, rstride=1, cstride=1, alpha=0.4) ax3.scatter(data[:,0], data[:,1], data[:,2], c='r', s=5) ax3.set_zlim3d(-5, 5) #Limiting Z-axis... * ` This code is giving a plot looks like(shown below): http://matplotlib.1069221.n5.nabble.com/file/n45474/figure_3.png But I was looking for a fitted-graph somewhat-looks like(however not exactly) this: http://matplotlib.1069221.n5.nabble.com/file/n45474/wire3d_demo1.png I mean the stretching-of-thread appearance w.r.t. distribution of points, I'm not being able to get such things in mine. -- View this message in context: http://matplotlib.1069221.n5.nabble.com/issue-with-wireframe-plot-tp45474.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ImportError: No module named _winreg
Thomas Caswell wrote: winreg looks like it is for programmatic access to the windows registry which mpl uses to find fonts in windows (https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/font_manager.py#L173). I suspect this is a problem with pychecker being too enthusiastic about checking imports. FYI: +*six-1.9.0-r1 (06 May 2015) + + 06 May 2015; Justin Lecher j...@gentoo.org +files/six-1.9.0-winreg.patch, + +six-1.9.0-r1.ebuild, metadata.xml, six-.ebuild: + Backport fix for windows only modules, bug #547928 + https://bugs.gentoo.org/show_bug.cgi?id=547928 Tom On Tue, Apr 28, 2015, 08:14 Martin MOKREJŠ mmokr...@gmail.com mailto:mmokr...@gmail.com wrote: Hi Thomas, thank you for your thoughts. But numpy is installed: $ python Python 2.7.9 (default, Apr 10 2015, 16:21:10) [GCC 4.9.2] on linux2 Type help, copyright, credits or license for more information. import pylab import numpy Probably you are right that the warnings (reported only by pychecker) are coming from numpy. They appear with *either* of: import pylab import numpy import matplotlib But, what I really asked for was where does the _winreg come from? It happens only with any of import pylab or import matplotlib. Martin Thomas Caswell wrote: Those look like they are coming up out of numpy. I am not familiar with gentoo, but it looks like numpy is not in the dependencies list. Tom On Mon, Apr 27, 2015, 16:59 Martin MOKREJŠ mmokr...@gmail.com mailto:mmokr...@gmail.com mailto:mmokr...@gmail.com mailto:mmokr...@gmail.com wrote: Hi, I use dev-python/matplotlib-1.4.3 and I suspect this is a recent regression in it. Can anybody reproduce this? $ pychecker test.py Processing module test (test.py)... warning: couldn't find real module for class class 'fftpack.error' (module name: fftpack) warning: couldn't find real module for class class 'lapack_lite.LapackError' (module name: lapack_lite) warning: couldn't find real module for class type 'mtrand.RandomState' (module name: mtrand) warning: couldn't find real module for class type 'mtrand.RandomState' (module name: mtrand) ImportError: No module named _winreg warning: couldn't find real module for class type 'cntr.Cntr' (module name: cntr) Warnings... test.py:3: Imported module (pylab) not used $ cat test.py #! /usr/bin/python import pylab $ -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users