You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
1
(9) |
2
(8) |
3
(6) |
4
(5) |
5
(10) |
6
(1) |
7
|
8
(5) |
9
(3) |
10
(12) |
11
(24) |
12
(28) |
13
(16) |
14
(3) |
15
(10) |
16
(17) |
17
(19) |
18
(10) |
19
(20) |
20
(7) |
21
(11) |
22
(7) |
23
(5) |
24
(4) |
25
(11) |
26
(19) |
27
(1) |
28
(1) |
29
(13) |
30
(7) |
31
(22) |
|
|
|
From: Christopher B. <c-...@as...> - 2011-08-12 23:57:26
|
I feel like I'm doing this right, but it doesn't work. Any clues? from matplotlib import pyplot as pp pp.plot((1,2,3)) ax = pp.gca() f = pp.figure(num=2) print 'first: %i' % ax.figure.number print 'second: %i' % f.number f.add_axes(ax) yields: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 606, in add_axes assert(a.get_figure() is self) AssertionError -- Christopher Brown, Ph.D. Associate Research Professor Department of Speech and Hearing Science Arizona State University http://pal.asu.edu |
From: Eric F. <ef...@ha...> - 2011-08-12 22:24:58
|
On 08/12/2011 08:07 AM, Benjamin Root wrote: > > > On Fri, Aug 12, 2011 at 12:47 PM, Yoshi Rokuko <yo...@ro... > <mailto:yo...@ro...>> wrote: > > you mean something like that? > > m.contourf(x, y, var, np.linspace(-100,100,33)) > > best regards > > > In addition to that (which would provide control over the contouring), > one can create a Normalization object, and supply that to the contourf > calls to make sure that the coloring is done consistently. Then, I I think it is usually better to accept the default norm, and simply set the color boundaries using the levels kwarg or the equivalent forth argument as above. > recommend making the colorbar object directly with a cmap and the same > normalization objects that you used for the contourf()'s. This example > should be helpful: I don't agree. It is simpler to pass the ContourSet object to the colorbar command or method. Colorbar knows about contourf and "just works" with it. See http://matplotlib.sourceforge.net/examples/pylab_examples/contourf_demo.html for basic contourf with colorbar, and http://matplotlib.sourceforge.net/examples/pylab_examples/multi_image.html for a colorbar with multiple images (contourf plots would work the same). The latter is more complex than is usually needed (it handles interactive changing of the colormap), but illustrates the use of a colorbar in a custom-made axes. > > http://matplotlib.sourceforge.net/examples/api/colorbar_only.html The colorbar_only example should be needed only *very* rarely, if ever. Eric > > Cheers! > Ben Root |
From: Bruce F. <br...@cl...> - 2011-08-12 18:47:16
|
That's exactly it! Thanks guys! Bruce --------------------------------------- Bruce W. Ford Clear Science, Inc. br...@cl... http://www.ClearScienceInc.com http://www.facebook.com/clearscience http://www.twitter.com/ROVs_rule Phone: (904) 796-8101 Fax: (904) 379-9704 8241 Parkridge Circle N. Jacksonville, FL 32211 Skype: bruce.w.ford On Fri, Aug 12, 2011 at 1:47 PM, Yoshi Rokuko <yo...@ro...> wrote: > you mean something like that? > > m.contourf(x, y, var, np.linspace(-100,100,33)) > > best regards > > > ------------------------------------------------------------------------------ > FREE DOWNLOAD - uberSVN with Social Coding for Subversion. > Subversion made easy with a complete admin console. Easy > to use, easy to manage, easy to install, easy to extend. > Get a Free download of the new open ALM Subversion platform now. > http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: R. P. S. <R.S...@um...> - 2011-08-12 18:39:02
|
I installed freetype2 to the default location: /usr/local Typing "freetype-config --ftversion" on the command line in any directory yields the freetype version number installed (2.4.6), which implies to me that its in the system search path, and thus should be available to distutils, right? -- R. Padraic Springuel, PhD |
From: Darren D. <dsd...@gm...> - 2011-08-12 18:27:01
|
On Fri, Aug 12, 2011 at 2:12 PM, R. Padraic Springuel <R.S...@um...> wrote: > I just downloaded and installed freetype2 in order to fix that potential > problem and I still get the same error (can't find the headers) in the > build output. Where did you install the headers? Is this location included in distutils search path? |
From: R. P. S. <R.S...@um...> - 2011-08-12 18:13:22
|
I just downloaded and installed freetype2 in order to fix that potential problem and I still get the same error (can't find the headers) in the build output. -- R. Padraic Springuel, PhD |
From: Benjamin R. <ben...@ou...> - 2011-08-12 18:08:05
|
On Fri, Aug 12, 2011 at 12:47 PM, Yoshi Rokuko <yo...@ro...> wrote: > you mean something like that? > > m.contourf(x, y, var, np.linspace(-100,100,33)) > > best regards > > In addition to that (which would provide control over the contouring), one can create a Normalization object, and supply that to the contourf calls to make sure that the coloring is done consistently. Then, I recommend making the colorbar object directly with a cmap and the same normalization objects that you used for the contourf()'s. This example should be helpful: http://matplotlib.sourceforge.net/examples/api/colorbar_only.html Cheers! Ben Root |
From: Benjamin R. <ben...@ou...> - 2011-08-12 18:03:23
|
On Fri, Aug 12, 2011 at 12:33 PM, Alex Flint <ale...@gm...> wrote: > I'm using the approach described the FAQ to save multiple figures to a > multi-page PDF: > > http://matplotlib.sourceforge.net/faq/howto_faq.html#save-multiple-plots-to-one-pdf-file > > The figures are produced at consecutive iterations of my algorithm, and > since each iteration takes a long time I'd like to save the PDF containing > the current figures at each iteration so that I can take a look. However, it > seems that I can only cause the PDF to be written to disk by calling > PdfPages.close(), after which I can't add any more figures. Is there any way > I can write a PdfPages object to file, then add more figures and write it to > file again later? > > \A > > Another option would be (if you are using Linux), to create an individual pdf file for each figure (which would allow you to view the figure individually as you progress), and then merge the pdfs together using the "pdfjam" command after you finish your program. Ben Root |
From: Benjamin R. <ben...@ou...> - 2011-08-12 18:00:48
|
On Fri, Aug 12, 2011 at 12:21 PM, WALTER Alain <ala...@th... > wrote: > Hello, > I've developped an application that displays volume by using Axes3d module > and plot() method. It runs well. > Volumes are expressed in axes x,y,z that represents respectively the > latitude,longitude and altitude. > Taking a simple volume : a parallelepiped is defined by 2 series of points > : > A1(x1,y1,z_upper), A2(x2,y2,z_upper), A3(x3,y3,z_upper), A4(x4,y4,z_upper) > A11(x1,y1,z_lower), A12(x2,y2,z_lower), A13(x3,y3,z_lower), > A14(x4,y4,z_lower) > My objective is to displays the faces of such volume (6 faces in that > case). > I suppose that I should trace my volume face by face and the following > source code displays a single surface (a face of my volume): > ########################################## > import gtk > import numpy as np > from matplotlib.patches import Polygon, PathPatch > import mpl_toolkits.mplot3d.art3d as art3d > from matplotlib.figure import Figure > from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as > FigureCanvas > > class SectorDisplay2__: > def __init__(self): > win = gtk.Window() > win.set_default_size(800,800) > vbox = gtk.VBox() > win.add(vbox) > > fig = Figure() > canvas = FigureCanvas(fig) # a gtk.DrawingArea > ax = fig.add_subplot(111, projection='3d') > > a = np.array([[0,0],[10,0],[10,10],[0,10]]) > p = Polygon(a,fill=True) > ax.add_patch(p) > art3d.pathpatch_2d_to_3d(p, z=3) > > ax.set_xlim3d(0, 20) > ax.set_ylim3d(0, 20) > ax.set_zlim3d(0, 20) > > vbox.pack_start(canvas) > win.show_all() > > # Run the Gtk mainloop > gtk.main() > > if __name__ == '__main__': > SectorDisplay2__() > ########################################## > > But two problems appears : > - the intruction "art3d.pathpatch_2d_to_3d(p, z=3)" can be called only once > ! else message "AttributeError: 'PathPatch3D' object has no attribute > '_path2d'" is issued > - the isntruction set_xlim3d(0, 20) has no effect : whatever the values > supplied to set_slim3d, the minimum/maximum of axes are defined always by > the minimum/maximum of the data to display (coordinates of my points). > There have been many errors that have since been fixed in the upcoming release with respect to mplot3d. Whether your problem is fixed or not would be hard to tell without knowing which version of matplotlib you are using. Furthermore, while the pathpatch_2d_to_3d() functions are technically made public (no leading underscore), it really is not intended to be the primary method of creating 3D polygons. Why not just simply use the Poly3DCollection object to create a collection of one polygons? (Yes, I know there is no Polygon3D class... I hope to have this all resolved in the future). The limit setting should definitely be fixed in the upcoming release, but it should be working in v1.0.1 as well. > Thank you for any suggestion (even to represent such volumes in a different > way as I choose) > > All that aside, what you are describing is the display of physical 3D objects in an interactive manner. I will tell you right now that you will not be happy with the results. Because matplotlib is inherently a 2D rendering system, the mplot3d module is a bit of a hack to get 3D displays to work. All data used to make the figures are projected from 3D to 2.1D. The ".1" is a z-sort layering value that represents an entire 3d object. Because there is only a single, scalar value to represent the location of the object in depth, matplotlib will not always render the image correctly. This is the layering artifact I spoke of in an earlier email. Imagine 3 square polygons that meet at a corner. At certain orientations, one of those polygons could be drawn as if it was behind the other two polygons, creating an Escher-like effect. While myself and others are doing work to eliminate this limitation of mplot3d to make matplotlib a one-stop-shop for scientific plotting, I would recommend other python tools such as MayaVi and Chaco: http://code.enthought.com/projects/mayavi/ http://code.enthought.com/projects/chaco/ I am not personally familiar with these tool, but they are all part of the same SciPy community that we are in. I have also heard good things about Blender, but that is more geared for movie-making. I hope this helps to save a lot of future aggravation, and I do hope that you continue to use matplotlib for 2d plotting! Cheers! Ben Root |
From: Yoshi R. <yo...@ro...> - 2011-08-12 17:49:17
|
you mean something like that? m.contourf(x, y, var, np.linspace(-100,100,33)) best regards |
From: <lu...@ip...> - 2011-08-12 17:37:57
|
Hello! I'm using matplotlib in my wx.Frame to draw some arrows and text at a certain position. The number and position of the arrows is based on previously created data. I do some calculations but basically it's like this: arrow = primer for each primer: draw one arrow at position y - 0.05 to the previos arrow (primer_y - 0.05). The x position of the arrow comes from the data, which is calculated and scaled (not so important know, it's just to now where the arrow should be at primer_x). Everything works fine until I have many arrows to draw. E.g. in my code example the data contain 62 arrows, where 18 are drawn correctly, the next 3 are missing but the text is there and the rest is completly missing. Does anyone knows what could be the problem? I tried allready to change the FigureSize but it's only stretch the arrows. Here's a quick and dirty working example, data is included in the code: http://pastebin.com/7mQmZm2c Any help is highly appreciated! Thanks in advance! Stefanie |
From: Alex F. <ale...@gm...> - 2011-08-12 17:33:09
|
I'm using the approach described the FAQ to save multiple figures to a multi-page PDF: http://matplotlib.sourceforge.net/faq/howto_faq.html#save-multiple-plots-to-one-pdf-file The figures are produced at consecutive iterations of my algorithm, and since each iteration takes a long time I'd like to save the PDF containing the current figures at each iteration so that I can take a look. However, it seems that I can only cause the PDF to be written to disk by calling PdfPages.close(), after which I can't add any more figures. Is there any way I can write a PdfPages object to file, then add more figures and write it to file again later? \A |
From: WALTER A. <ala...@th...> - 2011-08-12 17:29:39
|
My purpose is explain by a new post more explicitely. Alan ________________________________________ De : ben...@gm... [ben...@gm...] de la part de Benjamin Root [ben...@ou...] Date d'envoi : vendredi 12 août 2011 16:14 À : WALTER Alain Cc : mat...@li... Objet : Re: [Matplotlib-users] where to download module mpl_toolkits.mplot3d.art3d On Friday, August 12, 2011, WALTER Alain <ala...@th...<mailto:ala...@th...>> wrote: > Hello > I 've made some test so as to display a rectangle in a 3d view by using matplotlib methods. > I get examples from address http://nullege.com/codes/show/src%40m%40a%40matplotlib-HEAD%40matplotlib%40lib%40mpl_toolkits%40mplot3d%40axes3d.py/881/art3d.Line3DCollection/python > > import warnings > from matplotlib.axes import Axes, rcParams > from matplotlib import cbook > from matplotlib.transforms import Bbox > from matplotlib import collections > import numpy as np > from matplotlib.colors import Normalize, colorConverter, LightSource > > import art3d > import proj3d > import axis3d > > > then I remark that art3d is not included in matplotlib module, but I do not find any way to download art3d from the net. And why "import art3d" rather than "import mpl_toolkits.mplot3d.art3d" ? > Is anybody is aware about this topic. > Thanks a lot. > Since I happen to be the de facto 3d guy around here, I will respond. I think your "example" is actually a bit of test code within the mplot3d module. Because the code is within the same directory as the other files, that code can simply import art3d without specifying the module it resides in. I should also warn you that it seems like you want to use mplot3d for general 3d plotting. Mplot3d is not suitable for this because there are many layering artifacts that can occur. What are you planning to plot? Ben Root |
From: WALTER A. <ala...@th...> - 2011-08-12 17:23:45
|
Hello, I've developped an application that displays volume by using Axes3d module and plot() method. It runs well. Volumes are expressed in axes x,y,z that represents respectively the latitude,longitude and altitude. Taking a simple volume : a parallelepiped is defined by 2 series of points : A1(x1,y1,z_upper), A2(x2,y2,z_upper), A3(x3,y3,z_upper), A4(x4,y4,z_upper) A11(x1,y1,z_lower), A12(x2,y2,z_lower), A13(x3,y3,z_lower), A14(x4,y4,z_lower) My objective is to displays the faces of such volume (6 faces in that case). I suppose that I should trace my volume face by face and the following source code displays a single surface (a face of my volume): ########################################## import gtk import numpy as np from matplotlib.patches import Polygon, PathPatch import mpl_toolkits.mplot3d.art3d as art3d from matplotlib.figure import Figure from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas class SectorDisplay2__: def __init__(self): win = gtk.Window() win.set_default_size(800,800) vbox = gtk.VBox() win.add(vbox) fig = Figure() canvas = FigureCanvas(fig) # a gtk.DrawingArea ax = fig.add_subplot(111, projection='3d') a = np.array([[0,0],[10,0],[10,10],[0,10]]) p = Polygon(a,fill=True) ax.add_patch(p) art3d.pathpatch_2d_to_3d(p, z=3) ax.set_xlim3d(0, 20) ax.set_ylim3d(0, 20) ax.set_zlim3d(0, 20) vbox.pack_start(canvas) win.show_all() # Run the Gtk mainloop gtk.main() if __name__ == '__main__': SectorDisplay2__() ########################################## But two problems appears : - the intruction "art3d.pathpatch_2d_to_3d(p, z=3)" can be called only once ! else message "AttributeError: 'PathPatch3D' object has no attribute '_path2d'" is issued - the isntruction set_xlim3d(0, 20) has no effect : whatever the values supplied to set_slim3d, the minimum/maximum of axes are defined always by the minimum/maximum of the data to display (coordinates of my points). Thank you for any suggestion (even to represent such volumes in a different way as I choose) |
From: Lars F. <lhf...@gm...> - 2011-08-12 17:03:51
|
It seems I can only have a max of 7 labels displayed on my graph how do I increase that? self.axes.clear() vals = self.plotInfo.getYValues() self.axes.set_xticks = range(len(vals)) self.axes.set_xticklabels(self.plotInfo.getXValues()) self.axes.bar( left=range(len(vals)), height=map(float, vals), width=.2, align='center', alpha=0.44, picker=5) msg = self.plotInfo.annotation.message if msg != None: self.axes.set_title(self.plotInfo.annotation.message) self.axes.set_xlabel(self.plotInfo.xCol, fontsize=6) self.axes.set_ylabel(self.plotInfo.yCol, fontsize=6) self.fig.autofmt_xdate() self.resetLabels() Cheers, lars |
From: Bruce F. <br...@cl...> - 2011-08-12 16:30:11
|
In plotting the figure in the below code, I need to set the colorbar and contourf scale to a specific value range (e.g., -100 to 100). When plotting similar items, I need to ensure the scale is the same across multiple images for comparison and overide the autoscaling. Any ideas? Seems like it should be something obvious, but I've been chasing my tail and coming up empty. I appreciate the help! m = Basemap(resolution='c',projection='cyl',llcrnrlon=lon1,llcrnrlat=lat1,\ urcrnrlon=lon2,urcrnrlat=lat2) x,y = np.meshgrid(lon, lat) fig1=plt.figure() CS = m.contour(x,y,narr_totcld_summer - wwmca_totcld_summer,15,linewidths=0.5,colors='k') CS = m.contourf(x,y,narr_totcld_summer - wwmca_totcld_summer,cmap=plt.cm.jet) #CS = m.contourf(x,y,narr_totcld_summer - wwmca_totcld_summer,cmap=plt.cm.jet, clim=[-100,100]) #didn't work..no error but no scaling cbar = plt.colorbar(CS, shrink=0.7, format="%1.1f", spacing='proportional',orientation='vertical') m.drawcoastlines() m.drawmapboundary() # draw parallels and meridians. parallels = np.arange(-90,90,5) m.drawparallels(parallels,labels=[1,0,0,1]) meridians = np.arange(0,357.5,5) m.drawmeridians(meridians,labels=[1,0,0,1]) plt.title('Figure title') plt.show() --------------------------------------- Bruce W. Ford Clear Science, Inc. |
From: Benjamin R. <ben...@ou...> - 2011-08-12 15:22:08
|
On Fri, Aug 12, 2011 at 10:04 AM, David Just <Jus...@ma...> wrote: > Now that I’m pre-building all my enlarged interpolated images to scroll > through, I’m having trouble forcing the figure/FigureCanvas to be the size > I want. > > I’m trying: > fig.set_size_inches(768 / 72.0, 768 / 72.0), but it ends up the same size > as the default plot. > > Thanks, > Dave > > > Dave, Don't know if that is a bug or not (never tried that function). Typically, I just use the figsize kwarg in the figure constructor. Is it possible to do it from there, or are you looking to adjust the figure size *after* the figure has been displayed already? Ben Root |
From: David J. <Jus...@ma...> - 2011-08-12 15:04:52
|
Now that I¹m pre-building all my enlarged interpolated images to scroll through, I¹m having trouble forcing the figure/FigureCanvas to be the size I want. I¹m trying: fig.set_size_inches(768 / 72.0, 768 / 72.0), but it ends up the same size as the default plot. Thanks, Dave |
From: Stefanie L. <lu...@go...> - 2011-08-12 14:23:44
|
Hello! I'm using matplotlib in my wx.Frame to draw some arrows and text at a certain position. The number and position of the arrows is based on previously created data. I do some calculations but basically it's like this: arrow = primer for each primer: draw one arrow at position y - 0.05 to the previos arrow (primer_y - 0.05). The x position of the arrow comes from the data, which is calculated and scaled (not so important know, it's just to now where the arrow should be at primer_x). Everything works fine until I have many arrows to draw. E.g. in my code example the data contain 62 arrows, where 18 are drawn correctly, the next 3 are missing but the text is there and the rest is completly missing. Does anyone knows what could be the problem? I tried allready to change the FigureSize but it's only stretch the arrows. Here's a quick and dirty working example, data is included in the code: http://pastebin.com/7mQmZm2c Any help is highly appreciated! Thanks in advance! Stefanie |
From: Benjamin R. <ben...@ou...> - 2011-08-12 14:14:56
|
On Friday, August 12, 2011, WALTER Alain <ala...@th...> wrote: > Hello > I 've made some test so as to display a rectangle in a 3d view by using matplotlib methods. > I get examples from address http://nullege.com/codes/show/src%40m%40a%40matplotlib-HEAD%40matplotlib%40lib%40mpl_toolkits%40mplot3d%40axes3d.py/881/art3d.Line3DCollection/python > > import warnings > from matplotlib.axes import Axes, rcParams > from matplotlib import cbook > from matplotlib.transforms import Bbox > from matplotlib import collections > import numpy as np > from matplotlib.colors import Normalize, colorConverter, LightSource > > import art3d > import proj3d > import axis3d > > > then I remark that art3d is not included in matplotlib module, but I do not find any way to download art3d from the net. And why "import art3d" rather than "import mpl_toolkits.mplot3d.art3d" ? > Is anybody is aware about this topic. > Thanks a lot. > Since I happen to be the de facto 3d guy around here, I will respond. I think your "example" is actually a bit of test code within the mplot3d module. Because the code is within the same directory as the other files, that code can simply import art3d without specifying the module it resides in. I should also warn you that it seems like you want to use mplot3d for general 3d plotting. Mplot3d is not suitable for this because there are many layering artifacts that can occur. What are you planning to plot? Ben Root |
From: Michael D. <md...@st...> - 2011-08-12 12:34:35
|
I wonder if it's worthwhile throwing a warning when mplot3d is used in conjunction with the Gtk backend? Mike On 08/12/2011 02:47 AM, Benjamin Root wrote: > > > On Friday, August 12, 2011, WALTER Alain <ala...@th... > <mailto:ala...@th...>> wrote: > > You're right I'm not clear. You thought I' am using text() from > matplotlib but If I'm looking to the text() invocation from the module > Axes3D: > > Axes3D.text(x, y, z, s, zdir=None, **kwargs)¶ > > Add text to the plot. kwargs will be passed on to Axes.text, > except for the zdir keyword, which sets the direction to be used as > the z direction. > > In my case: > > ax. text(23.1, 14.0, 340.0, 'ABETI', color='red') > > Anyway, now I've replaced GTK backend by GTKagg backend, and > Everything seems better. > > Alan > > > > Ah, that explains everything! Because text on an axes3d object has to > be projected to 2d, it uses simple AGG text rotation behind the scenes > to achieve that effect (rather than actually performing the expensive > tedious calculations to fully project it). So, even though you are > not rotating the text, mplot3d is. > > Good to know that switching to GTKAgg fixed everything. > > Ben Root > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. > http://p.sf.net/sfu/wandisco-dev2dev > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Stefanie L. <lu...@go...> - 2011-08-12 11:41:58
|
Hello! I'm using matplotlib in my wx.Frame to draw some arrows and text at a certain position. The number and position of the arrows is based on previously created data. I do some calculations but basically it's like this: arrow = primer for each primer: draw one arrow at position y - 0.05 to the previos arrow (primer_y - 0.05). The x position of the arrow comes from the data, which is calculated and scaled (not so important know, it's just to now where the arrow should be at primer_x). Everything works fine until I have many arrows to draw. E.g. in my code example the data contain 62 arrows, where 18 are drawn correctly, the next 3 are missing but the text is there and the rest is completly missing. Does anyone knows what could be the problem? I tried allready to change the FigureSize but it's only stretch the arrows. Here's a quick and dirty working example, data is included in the code: http://pastebin.com/7mQmZm2c Any help is highly appreciated! Thanks in advance! Stefanie |
From: WALTER A. <ala...@th...> - 2011-08-12 08:40:54
|
Hello I 've made some test so as to display a rectangle in a 3d view by using matplotlib methods. I get examples from address http://nullege.com/codes/show/src%40m%40a%40matplotlib-HEAD%40matplotlib%40lib%40mpl_toolkits%40mplot3d%40axes3d.py/881/art3d.Line3DCollection/python import warnings from matplotlib.axes import Axes, rcParams from matplotlib import cbook from matplotlib.transforms import Bbox from matplotlib import collections import numpy as np from matplotlib.colors import Normalize, colorConverter, LightSource import art3d import proj3d import axis3d then I remark that art3d is not included in matplotlib module, but I do not find any way to download art3d from the net. And why "import art3d" rather than "import mpl_toolkits.mplot3d.art3d" ? Is anybody is aware about this topic. Thanks a lot. |
From: WALTER A. <ala...@th...> - 2011-08-12 07:41:26
|
Hello, I have a graphic, that is built with matpotlib facilities. I display some texts with a color for the text and a color for the corresponding background. I want to optimize the lisibility of such texts, then I shall adapted the background color to the foreground color. For example, when background is 'black', a good foreground is 'white' and conversely, but supposing that foreground colors are randomly allocated, it is rather complicated. Is there any method based on rgb parameters to deduce background color from foreground color ? Thank you |
From: Benjamin R. <ben...@ou...> - 2011-08-12 06:47:11
|
On Friday, August 12, 2011, WALTER Alain <ala...@th...> wrote: > You're right I'm not clear. You thought I' am using text() from matplotlib but If I'm looking to the text() invocation from the module Axes3D: > Axes3D.text(x, y, z, s, zdir=None, **kwargs)¶ > Add text to the plot. kwargs will be passed on to Axes.text, except for the zdir keyword, which sets the direction to be used as the z direction. > In my case: > ax. text(23.1, 14.0, 340.0, 'ABETI', color='red') > Anyway, now I've replaced GTK backend by GTKagg backend, and Everything seems better. > Alan > Ah, that explains everything! Because text on an axes3d object has to be projected to 2d, it uses simple AGG text rotation behind the scenes to achieve that effect (rather than actually performing the expensive tedious calculations to fully project it). So, even though you are not rotating the text, mplot3d is. Good to know that switching to GTKAgg fixed everything. Ben Root |