From fabien.maussion at gmail.com Wed Aug 5 10:02:05 2015 From: fabien.maussion at gmail.com (Fabien) Date: Wed, 05 Aug 2015 10:02:05 +0200 Subject: [Matplotlib-users] Why are matplotlib RGB images of dimensions (row, column, plane) Message-ID: Hi all, just to follow up a quite intense discussion on the numpy mailing list about dimensions ordering: why are matplotlib RGB images of dimensions (row, column, plane) instead of the standard (plane, row, column)? I guess this has been asked thousand times but I can't seem to find the answer... Thanks! Fabien From ben.root at ou.edu Wed Aug 5 15:09:16 2015 From: ben.root at ou.edu (Benjamin Root) Date: Wed, 5 Aug 2015 09:09:16 -0400 Subject: [Matplotlib-users] Why are matplotlib RGB images of dimensions (row, column, plane) In-Reply-To: References: Message-ID: I think it has to do with the conventions used by PIL way back in the day. To me, the current conventions make sense to me because imshow can work with just a simple 2D image. Color is then additional dimensions (and thus at the end). If I slice up an image like so: `im[20:40, 50:80]`, then imshow will work as expected regardless if that image was a 2D grayscale image or a 3D RGB[A] image. Cheers! Ben Root On Wed, Aug 5, 2015 at 4:02 AM, Fabien wrote: > Hi all, > > just to follow up a quite intense discussion on the numpy mailing list > about dimensions ordering: why are matplotlib RGB images of dimensions > (row, column, plane) instead of the standard (plane, row, column)? > > I guess this has been asked thousand times but I can't seem to find the > answer... > > Thanks! > > Fabien > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tcaswell at gmail.com Wed Aug 5 15:36:54 2015 From: tcaswell at gmail.com (Thomas Caswell) Date: Wed, 05 Aug 2015 13:36:54 +0000 Subject: [Matplotlib-users] Why are matplotlib RGB images of dimensions (row, column, plane) In-Reply-To: References: Message-ID: See http://scikit-image.org/docs/dev/user_guide/numpy_images.html and the discussion at https://github.com/scikit-image/scikit-image/pull/1280. skimage documents [rr, cc, ch] as the 'standard' for RGB(A) images ( http://scikit-image.org/docs/dev/user_guide/numpy_images.html#coordinate-conventions ) In general RGB color channels have a very different meaning that planes. The former is a result of internal details of a camera, where as the later is the result of changing something in data acquisition (in cases where color is one of the experimental controls it is a plane because you are probably not collecting exactly RGB and are going to composite down to get a RGB (false) color image). Tom On Wed, Aug 5, 2015 at 9:09 AM Benjamin Root wrote: > I think it has to do with the conventions used by PIL way back in the day. > To me, the current conventions make sense to me because imshow can work > with just a simple 2D image. Color is then additional dimensions (and thus > at the end). If I slice up an image like so: `im[20:40, 50:80]`, then > imshow will work as expected regardless if that image was a 2D grayscale > image or a 3D RGB[A] image. > > Cheers! > Ben Root > > On Wed, Aug 5, 2015 at 4:02 AM, Fabien wrote: > >> Hi all, >> >> just to follow up a quite intense discussion on the numpy mailing list >> about dimensions ordering: why are matplotlib RGB images of dimensions >> (row, column, plane) instead of the standard (plane, row, column)? >> >> I guess this has been asked thousand times but I can't seem to find the >> answer... >> >> Thanks! >> >> Fabien >> >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users at python.org >> https://mail.python.org/mailman/listinfo/matplotlib-users >> > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fabien.maussion at gmail.com Thu Aug 6 15:37:33 2015 From: fabien.maussion at gmail.com (Fabien) Date: Thu, 06 Aug 2015 15:37:33 +0200 Subject: [Matplotlib-users] Why are matplotlib RGB images of dimensions (row, column, plane) In-Reply-To: References: Message-ID: Thanks Ben & Tom for your responses, I guess it makes sense that way. Cheers, Fabien On 08/05/2015 03:36 PM, Thomas Caswell wrote: > See http://scikit-image.org/docs/dev/user_guide/numpy_images.html and > the discussion at https://github.com/scikit-image/scikit-image/pull/1280. > > skimage documents [rr, cc, ch] as the 'standard' for RGB(A) images > (http://scikit-image.org/docs/dev/user_guide/numpy_images.html#coordinate-conventions) > > In general RGB color channels have a very different meaning that > planes. The former is a result of internal details of a camera, where > as the later is the result of changing something in data acquisition (in > cases where color is one of the experimental controls it is a plane > because you are probably not collecting exactly RGB and are going to > composite down to get a RGB (false) color image). > > Tom > > On Wed, Aug 5, 2015 at 9:09 AM Benjamin Root > > wrote: > > I think it has to do with the conventions used by PIL way back in > the day. To me, the current conventions make sense to me because > imshow can work with just a simple 2D image. Color is then > additional dimensions (and thus at the end). If I slice up an image > like so: `im[20:40, 50:80]`, then imshow will work as expected > regardless if that image was a 2D grayscale image or a 3D RGB[A] image. > > Cheers! > Ben Root > > On Wed, Aug 5, 2015 at 4:02 AM, Fabien > > wrote: > > Hi all, > > just to follow up a quite intense discussion on the numpy > mailing list about dimensions ordering: why are matplotlib RGB > images of dimensions (row, column, plane) instead of the > standard (plane, row, column)? > > I guess this has been asked thousand times but I can't seem to > find the answer... > > Thanks! > > Fabien > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > > https://mail.python.org/mailman/listinfo/matplotlib-users > > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > > https://mail.python.org/mailman/listinfo/matplotlib-users > > > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > From garyr at fidalgo.net Mon Aug 10 11:59:59 2015 From: garyr at fidalgo.net (garyr) Date: Mon, 10 Aug 2015 02:59:59 -0700 Subject: [Matplotlib-users] (no subject) Message-ID: I have a PyQt4 program that has matplotlib imbedded. I followed the example code in embedding_in_qt4.py and the plotting works very well but I have a couple of questions. I would like to display some text in the plot area. I can do that but the text is overwritten by subsequent plots. Is there a way to clear the text between plots? I would also like to display a grid. Is that possible? Below is an outline of my plotting code. ========================================= from embedding_in_qt4 import MyMplCanvas self.mplEmbed = MyMplCanvas() def test(self): t = arange(0.0, 3.0, 0.01) s = sin(2*pi*t) ax = self.mplEmbed.axes fig = self.mplEmbed.fig fig.text(0.13, 0.85, "Now is the time", fontsize=10) fig.suptitle("The quick brown fox") ax.plot(t, s) self.mplEmbed.draw() From ben.root at ou.edu Mon Aug 10 15:18:11 2015 From: ben.root at ou.edu (Benjamin Root) Date: Mon, 10 Aug 2015 09:18:11 -0400 Subject: [Matplotlib-users] (no subject) In-Reply-To: References: Message-ID: The "fig.text()" call returns a Text artist. You can remove it later if you like by calling its "remove()" method. If your concern is mostly that the subsequent plots are appearing on top of it, and you would like the text to always be on top, you can set its "zorder" value to be something large, like 10: text = fig.text(0.13, 0.85, "Now is the time", fontsize=10, zorder=10) As for grids, you can turn that on with "ax.grid(True)". Cheers! Ben Root On Mon, Aug 10, 2015 at 5:59 AM, garyr wrote: > I have a PyQt4 program that has matplotlib imbedded. I followed the > example code > in embedding_in_qt4.py and the plotting works very well but I have a > couple of questions. > > I would like to display some text in the plot area. I can do that but the > text is overwritten by subsequent plots. Is there a way to clear the text > between plots? I would also like to display a grid. Is that possible? > > Below is an outline of my plotting code. > > ========================================= > from embedding_in_qt4 import MyMplCanvas > > self.mplEmbed = MyMplCanvas() > > def test(self): > t = arange(0.0, 3.0, 0.01) > s = sin(2*pi*t) > ax = self.mplEmbed.axes > fig = self.mplEmbed.fig > fig.text(0.13, 0.85, "Now is the time", fontsize=10) > fig.suptitle("The quick brown fox") > ax.plot(t, s) > self.mplEmbed.draw() > > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tcaswell at gmail.com Mon Aug 10 15:44:49 2015 From: tcaswell at gmail.com (Thomas Caswell) Date: Mon, 10 Aug 2015 13:44:49 +0000 Subject: [Matplotlib-users] (no subject) In-Reply-To: References: Message-ID: Also remember that you can update the text with `txt.set_text()` Tom On Mon, Aug 10, 2015 at 9:18 AM Benjamin Root wrote: > The "fig.text()" call returns a Text artist. You can remove it later if > you like by calling its "remove()" method. If your concern is mostly that > the subsequent plots are appearing on top of it, and you would like the > text to always be on top, you can set its "zorder" value to be something > large, like 10: > > text = fig.text(0.13, 0.85, "Now is the time", fontsize=10, zorder=10) > > As for grids, you can turn that on with "ax.grid(True)". > > Cheers! > Ben Root > > > On Mon, Aug 10, 2015 at 5:59 AM, garyr wrote: > >> I have a PyQt4 program that has matplotlib imbedded. I followed the >> example code >> in embedding_in_qt4.py and the plotting works very well but I have a >> couple of questions. >> >> I would like to display some text in the plot area. I can do that but the >> text is overwritten by subsequent plots. Is there a way to clear the text >> between plots? I would also like to display a grid. Is that possible? >> >> Below is an outline of my plotting code. >> >> ========================================= >> from embedding_in_qt4 import MyMplCanvas >> >> self.mplEmbed = MyMplCanvas() >> >> def test(self): >> t = arange(0.0, 3.0, 0.01) >> s = sin(2*pi*t) >> ax = self.mplEmbed.axes >> fig = self.mplEmbed.fig >> fig.text(0.13, 0.85, "Now is the time", fontsize=10) >> fig.suptitle("The quick brown fox") >> ax.plot(t, s) >> self.mplEmbed.draw() >> >> >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users at python.org >> https://mail.python.org/mailman/listinfo/matplotlib-users >> > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From garyr at fidalgo.net Tue Aug 11 04:24:20 2015 From: garyr at fidalgo.net (garyr) Date: Mon, 10 Aug 2015 19:24:20 -0700 Subject: [Matplotlib-users] (no subject) References: Message-ID: <836A31645C00416E8EA5B84F56FDC143@owner59bf8d40c> Calling remove() on the Text artist does the job, I finally discovered. I didn't initially understand what you were telling me in your post. Thanks again. Gary ----- Original Message ----- From: "Thomas Caswell" To: "Benjamin Root" ; "garyr" Cc: Sent: Monday, August 10, 2015 6:44 AM Subject: Re: [Matplotlib-users] (no subject) > Also remember that you can update the text with `txt.set_text()` > > Tom > > On Mon, Aug 10, 2015 at 9:18 AM Benjamin Root wrote: > >> The "fig.text()" call returns a Text artist. You can remove it later if >> you like by calling its "remove()" method. If your concern is mostly that >> the subsequent plots are appearing on top of it, and you would like the >> text to always be on top, you can set its "zorder" value to be something >> large, like 10: >> >> text = fig.text(0.13, 0.85, "Now is the time", fontsize=10, zorder=10) >> >> As for grids, you can turn that on with "ax.grid(True)". >> >> Cheers! >> Ben Root >> >> >> On Mon, Aug 10, 2015 at 5:59 AM, garyr wrote: >> >>> I have a PyQt4 program that has matplotlib imbedded. I followed the >>> example code >>> in embedding_in_qt4.py and the plotting works very well but I have a >>> couple of questions. >>> >>> I would like to display some text in the plot area. I can do that but the >>> text is overwritten by subsequent plots. Is there a way to clear the text >>> between plots? I would also like to display a grid. Is that possible? >>> >>> Below is an outline of my plotting code. >>> >>> ========================================= >>> from embedding_in_qt4 import MyMplCanvas >>> >>> self.mplEmbed = MyMplCanvas() >>> >>> def test(self): >>> t = arange(0.0, 3.0, 0.01) >>> s = sin(2*pi*t) >>> ax = self.mplEmbed.axes >>> fig = self.mplEmbed.fig >>> fig.text(0.13, 0.85, "Now is the time", fontsize=10) >>> fig.suptitle("The quick brown fox") >>> ax.plot(t, s) >>> self.mplEmbed.draw() >>> >>> >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Matplotlib-users at python.org >>> https://mail.python.org/mailman/listinfo/matplotlib-users >>> >> >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users at python.org >> https://mail.python.org/mailman/listinfo/matplotlib-users >> > From tcaswell at gmail.com Fri Aug 14 19:48:21 2015 From: tcaswell at gmail.com (Thomas Caswell) Date: Fri, 14 Aug 2015 17:48:21 +0000 Subject: [Matplotlib-users] Plotting from a data file In-Reply-To: References: <559989A3-238B-4C77-A4CC-A66DE700DCB4@me.com> <929AC724-ABA9-4C85-80C6-3194535A98D9@me.com> Message-ID: If you are trying to read a CSV file, I strongly suspect using pandas for ingesting them. http://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html Also, please use the new mailing list at matplotlib-users at python.org. Tom On Fri, Aug 14, 2015 at 1:39 PM Anthony Rollett wrote: > Maybe using ?genfromtxt" is simpler as a way to get going, see below for a > fragment of script? It should be able to read a CSV file since it?s just a > comma delimited text file. You might need to look up how to set the > delimiter character. > regards > Tony Rollet > > > #!/usr/bin/env python > > """ > > simple line/scatter plot. > > """ > > import matplotlib > > import numpy as np > > import matplotlib.cm as cm > > import matplotlib.mlab as mlab > > import matplotlib.pyplot as plt > > from numpy import * > > import scipy.interpolate > > > > isosphere = genfromtxt("KAM_test_5Oct14strs_strn.txt", names=True ) > > > > On Aug 14, 2015, at 12:05 PM, Kevin Parks wrote: > > > Hi, > > > > That doesn?t work. Just having my own msft.csv file in my directory > doesn't change anything as it is still pointing to some other msft.csv > someplace on my computron. (what and where is this file?) > > > > I also have never opened a file this way. I had prevously just used > something like: > > > > for l in open(filename).readlines(): > > l = l.strip().split() > > data.append([float(l[0]), float(l[1]), float(l[2]), int(l[3])]) > > > > values = [1,2,3,4] > > > > - > > > > I think ithis is just some example file that gets installed some place > so that the examples work? > > > > What does asfileobj=False do? > > > > Goodness the whole world of Python has radically changed in the short > time I have been out of the game. > > > > > > > >> On Aug 15, 2015, at 1:50 AM, Christian Alis wrote: > >> > >> The sample code reads data from msft.csv. If you enter your data into > >> a text editor and save it as msft.csv in python's current working > >> directory, then the following minimal code (pruned from plotfile_demo) > >> should work: > >> > >> from pylab import plotfile, show, gca > >> import matplotlib.cbook as cbook > >> > >> fname = cbook.get_sample_data('msft.csv', asfileobj=False) > >> > >> #test 5; single subplot > >> plotfile(fname, ('date', 'open', 'high', 'low', 'close'), > subplots=False) > >> > >> show() > >> > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Matplotlib-users mailing list > > Matplotlib-users at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wherewp at gmail.com Sun Aug 16 01:38:33 2015 From: wherewp at gmail.com (Where Where) Date: Sat, 15 Aug 2015 19:38:33 -0400 Subject: [Matplotlib-users] Marker size in pixels Message-ID: Salutations, community. I'd like to plot a circular marker with, say, a 10 pixel radius. Is it possible to do this in matplotlib? Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: From wherewp at gmail.com Sun Aug 16 02:46:43 2015 From: wherewp at gmail.com (Where Where) Date: Sat, 15 Aug 2015 20:46:43 -0400 Subject: [Matplotlib-users] Marker size in pixels In-Reply-To: References: Message-ID: Apologies; I didn't include enough information. I see that matplotlib allows you to set the marker size in points. My quest is to convert pixels to points. On Sat, Aug 15, 2015 at 7:38 PM, Where Where wrote: > Salutations, community. > > I'd like to plot a circular marker with, say, a 10 pixel radius. Is it > possible to do this in matplotlib? > > Daniel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joferkington at gmail.com Sun Aug 16 23:40:47 2015 From: joferkington at gmail.com (Joe Kington) Date: Sun, 16 Aug 2015 16:40:47 -0500 Subject: [Matplotlib-users] Ann: mpldatacursor v0.6 - Interactive annotation boxes for Matplotlib Message-ID: Hi folks, mpldatacursor version 0.6 has been released (it's long overdue). mpldatacursor provides interactive ?data cursors? (clickable annotation boxes) for matplotlib. Major Changes in v0.6 Version 0.6 adds: - Better handling of date-formatted axes. - ?Popup? text boxes can be interactively hidden by right-clicking (controllable through the hide_button and display_button kwargs). - Proper support for twinned axes. - Better unicode support for the formatter function. Note that this makes mpldatacursor incompatibile with early 3.x versions (3.0, 3.1, and 3.2). However, it remains compatible with Python >= 3.3 (e.g. 3.3, 3.4, and 3.5) as well as 2.6 and 2.7. - Annotation boxes will now try to stay visible inside the figure by default. Specify keep_inside=False to disable this. - Added basic support for extracting the z-value of 3D artists. - Made the precision of the default x & y formatting depend on the range of the axes. - Full support for interactive IPython notebooks through the nbagg backend. Note that the performance on the nbagg may be very poor. - Workarounds for annotation issues in Matplotlib v1.4.3 - Numerous bugfixes (Thanks to everyone for the reports!). Basic Usage mpldatacursor offers a few different styles of interaction through the datacursor function. As an example, this displays the x, y coordinates of the selected artist in an annotation box: import matplotlib.pyplot as plt import numpy as np from mpldatacursor import datacursor data = np.outer(range(10), range(1, 5)) fig, ax = plt.subplots() lines = ax.plot(data) ax.set_title('Click somewhere on a line') datacursor(lines) plt.show() Installation mpldatacursor can be installed from PyPi using easy_install/pip/etc. (e.g. pip install mpldatacursor) or you may download the source and install it directly with python setup.py install. Thanks, -Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From wherewp at gmail.com Mon Aug 17 00:11:04 2015 From: wherewp at gmail.com (Where Where) Date: Sun, 16 Aug 2015 18:11:04 -0400 Subject: [Matplotlib-users] Marker size in pixels In-Reply-To: References: Message-ID: Good question! I'm only saving my graphs to file (via an animation), and not displaying them to the screen. I have the dpi I'm using in a variable. On Sun, Aug 16, 2015 at 5:03 PM, William Ray Wing wrote: > How will you know in advance what conversion factor to use, that is, how > will you know what your users are equipped with? Display devices with 72 > pixels/in, 225 pixels/in, and 300 pixels/in would have very different > conversion factors. > > Bill > > > > On Aug 15, 2015, at 8:46 PM, Where Where wrote: > > Apologies; I didn't include enough information. I see that matplotlib > allows you to set the marker size in points. My quest is to convert pixels > to points. > > On Sat, Aug 15, 2015 at 7:38 PM, Where Where wrote: > >> Salutations, community. >> >> I'd like to plot a circular marker with, say, a 10 pixel radius. Is it >> possible to do this in matplotlib? >> >> Daniel >> > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgrav at me.com Wed Aug 19 17:07:30 2015 From: tgrav at me.com (Tommy Grav) Date: Wed, 19 Aug 2015 11:07:30 -0400 Subject: [Matplotlib-users] Basemap and counties Message-ID: I am trying to use matplotlib and basemap to show a map of the State of Indiana and highlight a few different counties. As a newbie I started with the code below, but I am having trouble with how to identify and fill specific counties. Anyone have any suggestions? from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt import numpy as np # make sure the value of resolution is a lowercase L, # for 'low', not a numeral 1 map = Basemap(projection='merc', lat_0=39.1622, lon_0=-86.5292, resolution = 'h', area_thresh = 0.1, llcrnrlon=-88.53, llcrnrlat=37.16, urcrnrlon=-84.53, urcrnrlat=41.16) map.drawcoastlines() map.drawcountries() map.drawstates(linewidth=0.5, linestyle="solid", color="r", antialiased=1, ax=None, zorder=None) map.drawcounties(linewidth=0.1,linestyle="solid", color="k", antialiased=1, ax=None, zorder=None, drawbounds=False) #map.fillcontinents(color='coral') map.drawmapboundary() map.drawmeridians(np.arange(0, 360, 30)) map.drawparallels(np.arange(-90, 90, 30)) plt.show() From ben.root at ou.edu Wed Aug 19 18:36:48 2015 From: ben.root at ou.edu (Benjamin Root) Date: Wed, 19 Aug 2015 12:36:48 -0400 Subject: [Matplotlib-users] Basemap and counties In-Reply-To: References: Message-ID: On Wed, Aug 19, 2015 at 11:07 AM, Tommy Grav wrote: > from mpl_toolkits.basemap import Basemap > import matplotlib.pyplot as plt > import numpy as np > > # make sure the value of resolution is a lowercase L, > # for 'low', not a numeral 1 > map = Basemap(projection='merc', lat_0=39.1622, lon_0=-86.5292, > resolution = 'h', area_thresh = 0.1, > llcrnrlon=-88.53, llcrnrlat=37.16, > urcrnrlon=-84.53, urcrnrlat=41.16) > > map.drawcoastlines() > map.drawcountries() > map.drawstates(linewidth=0.5, linestyle="solid", color="r", antialiased=1, > ax=None, zorder=None) > map.drawcounties(linewidth=0.1,linestyle="solid", color="k", antialiased=1, > ax=None, zorder=None, drawbounds=False) > #map.fillcontinents(color='coral') > map.drawmapboundary() > > map.drawmeridians(np.arange(0, 360, 30)) > map.drawparallels(np.arange(-90, 90, 30)) > > plt.show() > You can set the "facecolor" of the counties when you call drawcounties(). The problem is getting only certain counties colored. That means you pass a list of colors to "facecolor". The problem there is that you don't know the order in which the counties are processed. I've done this before, but I have to dig up that code... Maybe someone else can beat me to that? Ben Root -------------- next part -------------- An HTML attachment was scrubbed... URL: From fabien.maussion at gmail.com Thu Aug 20 13:42:50 2015 From: fabien.maussion at gmail.com (Fabien) Date: Thu, 20 Aug 2015 13:42:50 +0200 Subject: [Matplotlib-users] Graphic tests working with single files but not at package level Message-ID: Folks, I have two test files for a small personnal project. Both make use of the @image_comparison decorator to compare expected images to the outcome. When run on single files as follows, everything works fine: (py2) $ nosetests cleo/tests/test_colors.py .. ---------------------------------------------------------------------- Ran 2 tests in 0.414s OK (py2) $ nosetests cleo/tests/test_graphics.py ..... ---------------------------------------------------------------------- Ran 5 tests in 2.781s OK But when I run nose at the package level, I get an error: (py2) $ nosetests . ..F.... ====================================================================== FAIL: cleo.tests.test_graphics.test_DataLevels_graphics.test ---------------------------------------------------------------------- (...) ImageComparisonFailure: images not close: /home/mowglie/Documents/git/cleo/result_images/test_graphics/test_DataLevels.png vs. /home/mowglie/Documents/git/cleo/result_images/test_graphics/test_DataLevels-expected.png (RMS 25.865) ---------------------------------------------------------------------- Ran 7 tests in 3.685s FAILED (failures=1) An inspection of the failing test shows that the title and axis characters are slightly shifted, while the image plots (made with imshow) look exact same. I am pretty sure that I made no change to matplotlib's defaut params or whatsoever. I have the same behavior with python 2 and 3. Any idea what I could have done wrong? Thanks a lot, Fabien From Nicolas.Rougier at inria.fr Fri Aug 21 10:03:05 2015 From: Nicolas.Rougier at inria.fr (Nicolas P. Rougier) Date: Fri, 21 Aug 2015 10:03:05 +0200 Subject: [Matplotlib-users] Matplotlib tutorial Message-ID: I've updated the matplotlib tutorial available from: https://github.com/rougier/matplotlib-tutorial http://www.labri.fr/perso/nrougier/teaching/matplotlib/matplotlib.html with a new section on animation (rain effect and earthquakes from last 30 days). Still plenty of English errors, but I'm working on it (or if someone is willing to review it...). Nicolas From rmay31 at gmail.com Fri Aug 21 16:30:41 2015 From: rmay31 at gmail.com (Ryan May) Date: Fri, 21 Aug 2015 08:30:41 -0600 Subject: [Matplotlib-users] Matplotlib tutorial In-Reply-To: References: Message-ID: The animation example looks great! FYI, I'm only seeing the rain drop as animated; the earthquake example only shows me a static image (it's a PNG, so definitely not animated). Ryan On Fri, Aug 21, 2015 at 2:03 AM, Nicolas P. Rougier < Nicolas.Rougier at inria.fr> wrote: > > > I've updated the matplotlib tutorial available from: > > https://github.com/rougier/matplotlib-tutorial > http://www.labri.fr/perso/nrougier/teaching/matplotlib/matplotlib.html > > > with a new section on animation (rain effect and earthquakes from last 30 > days). > > Still plenty of English errors, but I'm working on it (or if someone is > willing to review it...). > > > > Nicolas > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.root at ou.edu Fri Aug 21 16:43:26 2015 From: ben.root at ou.edu (Benjamin Root) Date: Fri, 21 Aug 2015 10:43:26 -0400 Subject: [Matplotlib-users] Matplotlib tutorial In-Reply-To: References: Message-ID: The sections on subplots/axes/ticks are very nice! You will want to update the mailing list locations (they still point to the old lists). Which reminds me, I got to fix that in my tutorial as well... On Fri, Aug 21, 2015 at 10:30 AM, Ryan May wrote: > The animation example looks great! FYI, I'm only seeing the rain drop as > animated; the earthquake example only shows me a static image (it's a PNG, > so definitely not animated). > > Ryan > > On Fri, Aug 21, 2015 at 2:03 AM, Nicolas P. Rougier < > Nicolas.Rougier at inria.fr> wrote: > >> >> >> I've updated the matplotlib tutorial available from: >> >> https://github.com/rougier/matplotlib-tutorial >> http://www.labri.fr/perso/nrougier/teaching/matplotlib/matplotlib.html >> >> >> with a new section on animation (rain effect and earthquakes from last 30 >> days). >> >> Still plenty of English errors, but I'm working on it (or if someone is >> willing to review it...). >> >> >> >> Nicolas >> >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users at python.org >> https://mail.python.org/mailman/listinfo/matplotlib-users >> > > > > -- > Ryan May > Graduate Research Assistant > School of Meteorology > University of Oklahoma > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nicolas.Rougier at inria.fr Fri Aug 21 17:25:38 2015 From: Nicolas.Rougier at inria.fr (Nicolas P. Rougier) Date: Fri, 21 Aug 2015 17:25:38 +0200 Subject: [Matplotlib-users] Matplotlib tutorial In-Reply-To: References: Message-ID: <1AC96638-A5B3-4AA8-81BF-B5C8B47000F9@inria.fr> Thanks. I wanted to make a gif but it was too big. Nicolas > On 21 Aug 2015, at 16:30, Ryan May wrote: > > The animation example looks great! FYI, I'm only seeing the rain drop as animated; the earthquake example only shows me a static image (it's a PNG, so definitely not animated). > > Ryan > > On Fri, Aug 21, 2015 at 2:03 AM, Nicolas P. Rougier wrote: > > > I've updated the matplotlib tutorial available from: > > https://github.com/rougier/matplotlib-tutorial > http://www.labri.fr/perso/nrougier/teaching/matplotlib/matplotlib.html > > > with a new section on animation (rain effect and earthquakes from last 30 days). > > Still plenty of English errors, but I'm working on it (or if someone is willing to review it...). > > > > Nicolas > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > > > -- > Ryan May > Graduate Research Assistant > School of Meteorology > University of Oklahoma From Nicolas.Rougier at inria.fr Fri Aug 21 18:02:06 2015 From: Nicolas.Rougier at inria.fr (Nicolas P. Rougier) Date: Fri, 21 Aug 2015 18:02:06 +0200 Subject: [Matplotlib-users] Matplotlib tutorial In-Reply-To: References: Message-ID: <8D1ACED1-3F19-440C-8D02-F7468C45F992@inria.fr> > On 21 Aug 2015, at 16:43, Benjamin Root wrote: > > The sections on subplots/axes/ticks are very nice! > > You will want to update the mailing list locations (they still point to the old lists). Which reminds me, I got to fix that in my tutorial as well... Good point thanks. Nicolas > > On Fri, Aug 21, 2015 at 10:30 AM, Ryan May wrote: > The animation example looks great! FYI, I'm only seeing the rain drop as animated; the earthquake example only shows me a static image (it's a PNG, so definitely not animated). > > Ryan > > On Fri, Aug 21, 2015 at 2:03 AM, Nicolas P. Rougier wrote: > > > I've updated the matplotlib tutorial available from: > > https://github.com/rougier/matplotlib-tutorial > http://www.labri.fr/perso/nrougier/teaching/matplotlib/matplotlib.html > > > with a new section on animation (rain effect and earthquakes from last 30 days). > > Still plenty of English errors, but I'm working on it (or if someone is willing to review it...). > > > > Nicolas > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > > > -- > Ryan May > Graduate Research Assistant > School of Meteorology > University of Oklahoma > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > > From tcaswell at gmail.com Sun Aug 30 23:53:49 2015 From: tcaswell at gmail.com (Thomas Caswell) Date: Sun, 30 Aug 2015 21:53:49 +0000 Subject: [Matplotlib-users] ConnectionPatch axesA has to be the "latest" axes In-Reply-To: References: Message-ID: Sorry for the late response. The mailing list is now at matplotlib-users at python.org In your second case the issue is that axes are drawn one at a time so in that case the left axes with the line is drawn, then then right axes is drawn which overlays the line. If you do `ax22.set_zorder(-1)` that example will render correctly. This is a limitation of the compositing draw scheme that we use with the Agg. In the other two examples the issue is the check in https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/patches.py#L4532 which is called as part of the draw logic of the ConnectionPatch. This checks that the starting point of the connection patch is with in the confines of the axes which it belongs to. However, in your case 1 and 4 you have added the artist to the Axes in which the _end_ belongs so the starting point will never fall within they axes the artist belongs to, and hence will never draw. The two things that need to be true for this to work as expected: - the Axes which the correction patch is added to needs to have a higher zorder than the other axes (or be added later, the z-order sort is stable to falls back to the order in which the elements were added to break ties) - the connection patch must start in the Axes it belongs to. It would probably be better if `ConnectionPatch` was a child of the Figure instead of the Axes. Tom On Thu, Aug 20, 2015 at 11:55 AM Oliver wrote: > It would seem the `axesA` keyword always has to be the "latest" axes. If > not, the connector does not get added to the figure. > > Minimal, complete and verifiable example: > ###### > from matplotlib.patches import ConnectionPatch > import matplotlib.pyplot as plt > import matplotlib as mpl > import platform > > print(mpl.__version__) > print(platform.python_version()) > > xya = (.5,.5) > xyb = (.6,.7) > > # shows nothing > f1, (ax11, ax12) = plt.subplots(1,2, sharey=False) > con1 = ConnectionPatch(xyA=xya, xyB=xyb , coordsA='data', coordsB='data', > axesA=ax12, axesB=ax11) > ax11.add_artist(con1) > > # shows clipped line > f2, (ax21, ax22) = plt.subplots(1,2, sharey=False) > con2 = ConnectionPatch(xyA=xyb, xyB=xya , coordsA='data', coordsB='data', > axesA=ax21, axesB=ax22) > ax21.add_artist(con2) > > # shows desired result > f3, (ax31, ax32) = plt.subplots(1,2, sharey=False) > con3 = ConnectionPatch(xyA=xya, xyB=xyb , coordsA='data', coordsB='data', > axesA=ax32, axesB=ax31) > ax32.add_artist(con3) > > # shows nothing > f4, (ax41, ax42) = plt.subplots(1,2, sharey=False) > con4 = ConnectionPatch(xyA=xyb, xyB=xya , coordsA='data', coordsB='data', > axesA=ax41, axesB=ax42) > ax42.add_artist(con4) > > plt.draw() > plt.show() > > ###### > > While reference to clipping is made in the user guide[1], the seemingly > forced choice of `axesA` had me stumped for quite some time. While I > understand that the choice of the axes to add the connector is important to > avoid overlap (in other words, on which axes one should call the > `add_artist` method), it seems unimportant whether xyA or xyB are > referenced in ax1 or ax2. > > To clarify: I was expecting example 4 above to show a similar line as > example 3. > > > [1]: > http://matplotlib.org/users/annotations_guide.html#using-connectorpatch > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tcaswell at gmail.com Mon Aug 31 00:51:49 2015 From: tcaswell at gmail.com (Thomas Caswell) Date: Sun, 30 Aug 2015 22:51:49 +0000 Subject: [Matplotlib-users] Graphic tests working with single files but not at package level In-Reply-To: References: Message-ID: That is...odd. Are you being careful to reset any rcparams you change else where in your test suite? pyplot has global state and it can leak between tests. One very unsatisfying workaround is to use the `remove_text=True` kwarg on the decorator which will run the image comparisons with out the title. Tom On Thu, Aug 20, 2015 at 7:43 AM Fabien wrote: > Folks, > > I have two test files for a small personnal project. Both make use of > the @image_comparison decorator to compare expected images to the outcome. > > When run on single files as follows, everything works fine: > > (py2) $ nosetests cleo/tests/test_colors.py > .. > ---------------------------------------------------------------------- > Ran 2 tests in 0.414s > > OK > (py2) $ nosetests cleo/tests/test_graphics.py > ..... > ---------------------------------------------------------------------- > Ran 5 tests in 2.781s > > OK > > But when I run nose at the package level, I get an error: > > > (py2) $ nosetests . > ..F.... > ====================================================================== > FAIL: cleo.tests.test_graphics.test_DataLevels_graphics.test > ---------------------------------------------------------------------- > (...) > ImageComparisonFailure: images not close: > > /home/mowglie/Documents/git/cleo/result_images/test_graphics/test_DataLevels.png > vs. > > /home/mowglie/Documents/git/cleo/result_images/test_graphics/test_DataLevels-expected.png > (RMS 25.865) > > ---------------------------------------------------------------------- > Ran 7 tests in 3.685s > > FAILED (failures=1) > > > An inspection of the failing test shows that the title and axis > characters are slightly shifted, while the image plots (made with > imshow) look exact same. I am pretty sure that I made no change to > matplotlib's defaut params or whatsoever. I have the same behavior with > python 2 and 3. > > Any idea what I could have done wrong? > > Thanks a lot, > > Fabien > > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at python.org > https://mail.python.org/mailman/listinfo/matplotlib-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tcaswell at gmail.com Mon Aug 31 02:21:50 2015 From: tcaswell at gmail.com (Thomas Caswell) Date: Mon, 31 Aug 2015 00:21:50 +0000 Subject: [Matplotlib-users] TrueType font is missing table In-Reply-To: References: Message-ID: I am having trouble reproducing this, you might want to raise this issue with the Fedora folks as they do some funny stuff with fonts + packaging mpl. Tom PS this list has moved to matplotlib-users at python.org On Mon, Jul 6, 2015 at 8:43 AM Neal Becker wrote: > Neal Becker wrote: > > > Using mpl 1.4.3 on Fedora 22, I'm trying to use stix font (so I can > render > > the unicode lambda label on the x-axis). I have every fedora package > > related to 'stix', I think. It displays ok in qtagg4, but if I try to > save > > to pdf if fails with > > > > RuntimeError Traceback (most recent call > > last) in () > > ----> 1 exec(open(r'/usr/tmp/python-8710q1Y.py').read()) # PYTHON-MODE > > > > in () > > > > /usr/lib64/python3.4/site-packages/matplotlib/pyplot.py in savefig(*args, > > **kwargs) > > 575 def savefig(*args, **kwargs): > > 576 fig = gcf() > > --> 577 res = fig.savefig(*args, **kwargs) > > 578 draw() # need this if 'transparent=True' to reset colors > > 579 return res > > > > /usr/lib64/python3.4/site-packages/matplotlib/figure.py in savefig(self, > > *args, **kwargs) > > 1474 self.set_frameon(frameon) > > 1475 > > -> 1476 self.canvas.print_figure(*args, **kwargs) > > 1477 > > 1478 if frameon: > > > > /usr/lib64/python3.4/site-packages/matplotlib/backend_bases.py in > > print_figure(self, filename, dpi, facecolor, edgecolor, orientation, > > format, **kwargs) > > 2209 orientation=orientation, > > 2210 bbox_inches_restore=_bbox_inches_restore, > > -> 2211 **kwargs) > > 2212 finally: > > 2213 if bbox_inches and restore_bbox: > > > > /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in > > print_pdf(self, filename, **kwargs) > > 2489 file.endStream() > > 2490 else: # we opened the file above; now > > finish > > it off > > -> 2491 file.close() > > 2492 > > 2493 > > > > /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in > > close(self) > > 523 self.endStream() > > 524 # Write out the various deferred objects > > --> 525 self.writeFonts() > > 526 self.writeObject(self.alphaStateObject, > > 527 dict([(val[0], val[1]) > > > > /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in > > writeFonts(self) > > 626 chars = self.used_characters.get(stat_key) > > 627 if chars is not None and len(chars[1]): > > --> 628 fonts[Fx] = self.embedTTF(realpath, chars[1]) > > 629 self.writeObject(self.fontObject, fonts) > > 630 > > > > /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in > > embedTTF(self, filename, characters) > > 1101 > > 1102 if fonttype == 3: > > -> 1103 return embedTTFType3(font, characters, descriptor) > > 1104 elif fonttype == 42: > > 1105 return embedTTFType42(font, characters, descriptor) > > > > /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in > > embedTTFType3(font, characters, descriptor) > > 887 # actual outlines) > > 888 rawcharprocs = ttconv.get_pdf_charprocs( > > --> 889 filename.encode(sys.getfilesystemencoding()), > > glyph_ids) > > 890 charprocs = {} > > 891 for charname, stream in six.iteritems(rawcharprocs): > > > > RuntimeError: TrueType font is missing table > > > > forgot to attach the code. > > > #!/usr/bin/python > # -*- coding: utf-8 -*- > data='''carriers,lambda,per > 1,7,1.3e-4 > 1,8,3.0e-4 > 1,9,.0014 > 8,7,4.8e-4 > 8,8,1.3e-3 > 8,9,.0075 > ''' > > import pandas as pd > try: > from StringIO import StringIO > except ImportError: > from io import StringIO > df = pd.read_csv (StringIO (data)) > g = df.groupby ('carriers') > import matplotlib.pyplot as plt > > import matplotlib as mpl > #mpl.rcParams['font.family'] = 'stix' > mpl.rc('font', family='DejaVu Sans') > #mpl.rc('font', family='stix') > > import itertools > markers = itertools.cycle(['o','s','v']) > > fig = plt.figure() > ax = fig.add_subplot(111) > for c, stuff in g: > plt.semilogy (stuff['lambda'].values, stuff['per'].values, > label='carriers=%s'%c, marker=next(markers)) > > plt.legend (loc='best') > ax.set_xlabel (' ') > ax.set_ylabel ('per') > plt.grid(which='major', linestyle='solid') > plt.grid(which='minor', linestyle='dashed') > plt.savefig ('per_vs_lambda.pdf') > > > > > > > > ------------------------------------------------------------------------------ > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tcaswell at gmail.com Mon Aug 31 05:14:38 2015 From: tcaswell at gmail.com (Thomas Caswell) Date: Mon, 31 Aug 2015 03:14:38 +0000 Subject: [Matplotlib-users] matplotlib documentation from python notebook? In-Reply-To: References: Message-ID: A tad dry, but through, example of what the notebook backend can do is to look at the UAT at https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/web_backend/nbagg_uat.ipynb Tom On Mon, Jun 8, 2015 at 5:28 PM Jody Klymak wrote: > Hi Ben, > > My idea was to just make the notebook the ?example?. But nbconvert-ing > the notebook makes static images that then need to be checked into the > repository, and take space, so I wasn?t sure how desirable that was. > > It would be fun to have the documentation script accept ipython notebooks > and run nbconvert on them. Being able to save state as you work through > examples is quite nice, versus creating five or six standalone *.py files > that then get run at build time. Of course you are adding a dependency to > anyone who has wants to build the docs. > > Thanks, Jody > > > > On 8 Jun 2015, at 13:35 PM, Benjamin Root wrote: > > No, there isn't an accepted way to do that AFAIK. However, it doesn't seem > like it is all that far off. Our doc-build process will create the images > from the examples automatically, so you don't need to include the image > tag. It is sort of a way to make sure the examples work and that the image > matches the code correctly. > > On Mon, Jun 8, 2015 at 1:06 PM, Jody Klymak wrote: > >> >> Hi all, >> >> If I want to contribute *.rst files to the matplotlib documentation, I >> can see a few styles already contributed, at least one of which makes >> extensive use of ipython (http://matplotlib.org/users/image_tutorial.html). >> However, even it makes use of `.. sourcecode:: python` and `.. plot::` >> blocks. >> >> If I convert an ipython notebook to rst, it formats as: `.. code:: >> python` and instead of making plots it loads images: >> `.. image:: MyExample_files/MyExample_1_0.png` >> >> So, is there an acceptable way to directly make matplotlib documentation >> directly from a notebook? I didn?t see anything, but wanted to check, as >> that would by far be the easiest way to make a *.rst that had structured >> text, code, and plots. >> >> Thanks, Jody >> >> -- >> Jody Klymak >> http://web.uvic.ca/~jklymak/ >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > -- > Jody Klymak > http://web.uvic.ca/~jklymak/ > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgrav at me.com Tue Aug 18 19:09:22 2015 From: tgrav at me.com (Tommy Grav) Date: Tue, 18 Aug 2015 17:09:22 -0000 Subject: [Matplotlib-users] baseman and counties Message-ID: <74881E96-0FCB-4F98-BBE7-547643B01259@me.com> I am trying to use matplotlib and basemap to show a map of the State of Indiana and highlight a few different counties. As a newbie I started with the code below, but I am having trouble with how to identify and fill specific counties. Anyone have any suggestions? from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt import numpy as np # make sure the value of resolution is a lowercase L, # for 'low', not a numeral 1 map = Basemap(projection='merc', lat_0=39.1622, lon_0=-86.5292, resolution = 'h', area_thresh = 0.1, llcrnrlon=-88.53, llcrnrlat=37.16, urcrnrlon=-84.53, urcrnrlat=41.16) map.drawcoastlines() map.drawcountries() map.drawstates(linewidth=0.5, linestyle="solid", color="r", antialiased=1, ax=None, zorder=None) map.drawcounties(linewidth=0.1,linestyle="solid", color="k", antialiased=1, ax=None, zorder=None, drawbounds=False) #map.fillcontinents(color='coral') map.drawmapboundary() map.drawmeridians(np.arange(0, 360, 30)) map.drawparallels(np.arange(-90, 90, 30)) plt.show() From aspannaus at gmail.com Tue Aug 18 19:35:19 2015 From: aspannaus at gmail.com (Adam Spannaus) Date: Tue, 18 Aug 2015 17:35:19 -0000 Subject: [Matplotlib-users] Problem: AttributeError: 'module' object has no attribute '_string_to_bool' In-Reply-To: References: <1439916549616-46020.post@n5.nabble.com> Message-ID: <55D36CCD.1050501@gmail.com> Thanks, it all works now. On 08/18/2015 12:53 PM, Thomas Caswell wrote: > Also, please use the new mailing list at matplotlib-users at python.org > > > > > On Tue, Aug 18, 2015 at 12:53 PM Thomas Caswell > wrote: > > This is related to files from the previous implementation still > being around. Please make sure you have fully removed the old mpl > installation before installing the new one. Be aware that there > is some difference in the way pip/setuptools/distutils deal with > namespace packages so look for both `matplotlib` and > `mpl_toolkits` directories. > > Tom > > On Tue, Aug 18, 2015 at 12:49 PM Bob Dobalina > wrote: > > When trying to create a 3D axes, I receive this error: > > /usr/lib/pymodules/python2.7/mpl_toolkits/mplot3d/axes3d.pyc > in grid(self, > b, **kwargs) > 1254 if len(kwargs) : > 1255 b = True > -> 1256 self._draw_grid = maxes._string_to_bool(b) > 1257 > 1258 def ticklabel_format(self, **kwargs) : > > AttributeError: 'module' object has no attribute '_string_to_bool' > > I'm running matplotlib 1.4.3 on linux (ubuntu-based), and was > able to create > 3D axes until I updated last week. > > Thanks in advance. > > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/Problem-AttributeError-module-object-has-no-attribute-string-to-bool-tp46020.html > Sent from the matplotlib - users mailing list archive at > Nabble.com. > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: