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
|
|
From: Raymond S. <sm...@mi...> - 2014-10-16 20:26:19
|
Please use the link on the bottom of every message sent to this mailing list: https://lists.sourceforge.net/lists/listinfo/matplotlib-users On that page, there is an option for un-subscribing. Best, Ray On Thu, Oct 16, 2014 at 4:22 PM, Almerindo Paiva <alo...@gm...> wrote: > Dear Sirs, > > I would like to ask you to unsubscripte my account from > mat...@li.... > > Kind regards, > > Almerindo Paiva > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Almerindo P. <alo...@gm...> - 2014-10-16 20:22:26
|
Dear Sirs, I would like to ask you to unsubscripte my account from mat...@li.... Kind regards, Almerindo Paiva |
|
From: Thomas C. <tca...@gm...> - 2014-10-16 18:50:27
|
Tobais,
In the future please send all messages like this to the user mailing list (cc'd)
Try using the 1.4.1rc1 release candidate, there are windows installers
on sourceforge. If that does not work, please open a new github
issue.
Tom
On Thu, Oct 16, 2014 at 2:43 PM, Tobias Landwehr <Dol...@gm...> wrote:
> Greetings Thomas,
>
> I am sorry to disturb you, but I found on github, that you could've already
> provided a solution to my problem almost three weeks ago. I couldn't really
> understand the way how to solve the prob, which is the reason I decided to
> write you.
>
> I am currently working with Python 2.7.2 and want to import the matplotlib.
> Problems arise obviously since my username-folder contains a non-ascii sign
> (german Ä). I would prefer to not setup a second user and the user's folder
> shouldn't/can't be renamed.
>
> If you could find some time to deal with the problem over the weekend or
> give me a hint, how to solve it, I would be really grateful. Below you'll
> find the fail report.
>
> Many thanks in advance, Tobias
>
> Traceback (most recent call last):
> File "C:\Python27\workspace\ITT\src\itt\statistics\block01\LandCover.py",
> line 7, in <module>
> import matplotlib.pyplot as plt
> File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 1048, in
> <module>
> rcParams = rc_params()
> File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 897, in
> rc_params
> fname = matplotlib_fname()
> File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 759, in
> matplotlib_fname
> configdir = _get_configdir()
> File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 630, in
> _get_configdir
> return _get_config_or_cache_dir(_get_xdg_config_dir())
> File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 555, in
> _get_xdg_config_dir
> path = get_home()
> File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 323, in
> wrapper
> ret = func(*args, **kwargs)
> File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 509, in
> _get_home
> path = os.path.expanduser("~")
> File "C:\Python27\lib\ntpath.py", line 310, in expanduser
> return userhome + path[i:]
> UnicodeDecodeError: 'ascii' codec can't decode byte 0x84 in position 16:
> ordinal not in range(128)
>
--
Thomas Caswell
tca...@gm...
|
|
From: David H. <dh...@gm...> - 2014-10-16 16:02:35
|
Thanks Ben. I'll take a look through the archive. On 10/16/14, 9:43 AM, Benjamin Root wrote: > What you are looking for is called "rasterization". Matplotlib does this > deep within the codebase and is not accessible (believe me, I tried). > However, there have been other discussions in this mailing list about > how to use GDAL to rasterize a set of polygons (represented as paths), > including some links to stack-overflow questions. It isn't a complete > end-to-end solution, but the pieces are there. > > Cheers! > Ben Root > > > On Wed, Oct 15, 2014 at 2:09 PM, David Hoese <dh...@gm... > <mailto:dh...@gm...>> wrote: > > For the first question, if I save the figure (as a PNG I'm guessing, > unless you can save into a more array-like format), I'd have to make > sure that there were no labels or ticks and that the axes fit the whole > figure. I'd also have to get the dpi and size information correct, but I > suppose it would be possible that way. I was hoping for something a > little easier and in-memory. This might be the simplest answer the more > I think about it. > > If I'm starting from the paths, I'd still have to write them to the > "grid" array. I thought maybe the backend could do that and I magically > get the image. > > I'll look in to using savefig and getting the data out. > > -Dave > > On 10/15/14, 12:42 PM, Joy merwin monteiro wrote: > > pardon the query if it seems dumb, but why don't you do a savefig() > > after plotting the data and then convert it to any format you like? > > > > alternatively, contour() and contourf() both create paths that can > > be accessed: > > > > cf = contourf(.....) > > > > output = cf.collections.pop() > > paths = output.get_paths()[i] # for the various contours > > > > the x,y coordinates can then be accessed as > > > > xcoords = paths.vertices.transpose()[0] > > ycoords = paths.vertices.transpose()[1] > > > > you can then do whatever you wish with them. > > > > Joy > > > > > > On Wed, Oct 15, 2014 at 9:11 PM, David Hoese <dh...@gm... <mailto:dh...@gm...> > > <mailto:dh...@gm... <mailto:dh...@gm...>>> wrote: > > > > I've been searching and reading through source code and > google searches > > to see if this is possible, but no luck so far. I'm basically > trying to > > map some data using Basemap, use contourf to map it to an > image, and > > then put that image in a geotiff (or other format) for use in > other GIS > > programs. I have other tools for remapping data and creating > geotiffs, > > but the contour image looks better. All I would need to get > this to work > > would be an array representing the image inside the axes of a > contourf > > plot. I found a lot of geotiff -> Basemap png results, but I > would like > > the reverse. > > > > Since the plots are made using paths/patches I'm guessing I > would have > > to have a backend render the image and then extract the image > somehow. > > Does anyone have some tips or tricks to do something like > this? Or am I > > thinking about this completely wrong? > > > > Thanks for any help and if you could CC me in any replies it > would be > > much appreciated. > > > > -Dave > > > > > ------------------------------------------------------------------------------ > > Comprehensive Server Monitoring with Site24x7. > > Monitor 10 servers for $9/Month. > > Get alerted through email, SMS, voice calls or mobile push > > notifications. > > Take corrective actions from your mobile device. > > http://p.sf.net/sfu/Zoho > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > <mailto:Mat...@li...> > > <mailto:Mat...@li... > <mailto:Mat...@li...>> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > > > -- > > The best ruler, when he finishes his > > tasks and completes his affairs, > > the people say > > “It all happened naturally” > > > > - Te Tao Ch'ing > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push > notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Benjamin R. <ben...@ou...> - 2014-10-16 14:44:25
|
What you are looking for is called "rasterization". Matplotlib does this deep within the codebase and is not accessible (believe me, I tried). However, there have been other discussions in this mailing list about how to use GDAL to rasterize a set of polygons (represented as paths), including some links to stack-overflow questions. It isn't a complete end-to-end solution, but the pieces are there. Cheers! Ben Root On Wed, Oct 15, 2014 at 2:09 PM, David Hoese <dh...@gm...> wrote: > For the first question, if I save the figure (as a PNG I'm guessing, > unless you can save into a more array-like format), I'd have to make > sure that there were no labels or ticks and that the axes fit the whole > figure. I'd also have to get the dpi and size information correct, but I > suppose it would be possible that way. I was hoping for something a > little easier and in-memory. This might be the simplest answer the more > I think about it. > > If I'm starting from the paths, I'd still have to write them to the > "grid" array. I thought maybe the backend could do that and I magically > get the image. > > I'll look in to using savefig and getting the data out. > > -Dave > > On 10/15/14, 12:42 PM, Joy merwin monteiro wrote: > > pardon the query if it seems dumb, but why don't you do a savefig() > > after plotting the data and then convert it to any format you like? > > > > alternatively, contour() and contourf() both create paths that can > > be accessed: > > > > cf = contourf(.....) > > > > output = cf.collections.pop() > > paths = output.get_paths()[i] # for the various contours > > > > the x,y coordinates can then be accessed as > > > > xcoords = paths.vertices.transpose()[0] > > ycoords = paths.vertices.transpose()[1] > > > > you can then do whatever you wish with them. > > > > Joy > > > > > > On Wed, Oct 15, 2014 at 9:11 PM, David Hoese <dh...@gm... > > <mailto:dh...@gm...>> wrote: > > > > I've been searching and reading through source code and google > searches > > to see if this is possible, but no luck so far. I'm basically trying > to > > map some data using Basemap, use contourf to map it to an image, and > > then put that image in a geotiff (or other format) for use in other > GIS > > programs. I have other tools for remapping data and creating > geotiffs, > > but the contour image looks better. All I would need to get this to > work > > would be an array representing the image inside the axes of a > contourf > > plot. I found a lot of geotiff -> Basemap png results, but I would > like > > the reverse. > > > > Since the plots are made using paths/patches I'm guessing I would > have > > to have a backend render the image and then extract the image > somehow. > > Does anyone have some tips or tricks to do something like this? Or > am I > > thinking about this completely wrong? > > > > Thanks for any help and if you could CC me in any replies it would be > > much appreciated. > > > > -Dave > > > > > ------------------------------------------------------------------------------ > > Comprehensive Server Monitoring with Site24x7. > > Monitor 10 servers for $9/Month. > > Get alerted through email, SMS, voice calls or mobile push > > notifications. > > Take corrective actions from your mobile device. > > http://p.sf.net/sfu/Zoho > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > <mailto:Mat...@li...> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > > > -- > > The best ruler, when he finishes his > > tasks and completes his affairs, > > the people say > > “It all happened naturally” > > > > - Te Tao Ch'ing > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Thomas C. <tca...@gm...> - 2014-10-16 14:02:50
|
Awesome, thanks! On Thu, Oct 16, 2014 at 8:14 AM, Sandro Tosi <mo...@de...> wrote: > Hi! > I just uploaded mpl 1.4.1-rc1 in Debian, so it can geta bit of > exposure even on the weird HW we still support. > > Cheers, > Sandro > > On Tue, Oct 14, 2014 at 5:40 PM, Thomas Caswell <tca...@gm...> wrote: >> I am happy to announce that I have tagged a release candidate for >> 1.4.1. This is a bug-fix release which fixes most of the bug that >> popped up in 1.4.0 including: >> >> - setup.py does not die when freetype is not installed >> - reverts the changes to interactive plotting so `ion` will work as expected >> - sundry unicode fixes (looking up user folders, importing >> seaborn/pandas/networkx with macosx backend >> - fixed boxplot regressions >> >> The tarball is available from github, sourceforge and can be install via >> >> pip install matplotlib==1.4.1rc1 >> >> Tom >> >> >> >> -- >> Thomas Caswell >> tca...@gm... >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> http://p.sf.net/sfu/Zoho >> _______________________________________________ >> Matplotlib-devel mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > > > -- > Sandro Tosi (aka morph, morpheus, matrixhasu) > My website: http://matrixhasu.altervista.org/ > Me at Debian: http://wiki.debian.org/SandroTosi -- Thomas Caswell tca...@gm... |
|
From: Sandro T. <mo...@de...> - 2014-10-16 12:14:39
|
Hi! I just uploaded mpl 1.4.1-rc1 in Debian, so it can geta bit of exposure even on the weird HW we still support. Cheers, Sandro On Tue, Oct 14, 2014 at 5:40 PM, Thomas Caswell <tca...@gm...> wrote: > I am happy to announce that I have tagged a release candidate for > 1.4.1. This is a bug-fix release which fixes most of the bug that > popped up in 1.4.0 including: > > - setup.py does not die when freetype is not installed > - reverts the changes to interactive plotting so `ion` will work as expected > - sundry unicode fixes (looking up user folders, importing > seaborn/pandas/networkx with macosx backend > - fixed boxplot regressions > > The tarball is available from github, sourceforge and can be install via > > pip install matplotlib==1.4.1rc1 > > Tom > > > > -- > Thomas Caswell > tca...@gm... > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi |
|
From: Mark J. <mja...@es...> - 2014-10-15 22:52:57
|
Thanks for the reiteration/clarification... Do you see any reason why a fail-safe check similar to what I proposed would be ill advised? MJ -----Original Message----- From: Matthew Brett [mailto:mat...@gm...] Sent: Wednesday, October 15, 2014 3:44 PM To: Mark Janikas Cc: Thomas Caswell; Phil Elson; Benjamin Root; Matplotlib Users Subject: Re: [Matplotlib-users] FW: traceback when import matplotlib.pyplot twice Hi, On Wed, Oct 15, 2014 at 2:56 PM, Mark Janikas <mja...@es...> wrote: > > When I replaced the file I got the 1st error below. As you had pointed out earlier… this is strange. It only occurs when you run it more than once… strange indeed… it is like a manager is being created and deleted but perhaps the reference hasn’t Just to echo what Tom said, the error suggests that ``gc.collect()`` is being called after the gc module is most of the way through being torn down, so that the ``collect`` function has already been deleted... Cheers, Matthew |
|
From: Matthew B. <mat...@gm...> - 2014-10-15 22:44:54
|
Hi, On Wed, Oct 15, 2014 at 2:56 PM, Mark Janikas <mja...@es...> wrote: > > When I replaced the file I got the 1st error below. As you had pointed out earlier… this is strange. It only occurs when you run it more than once… strange indeed… it is like a manager is being created and deleted but perhaps the reference hasn’t Just to echo what Tom said, the error suggests that ``gc.collect()`` is being called after the gc module is most of the way through being torn down, so that the ``collect`` function has already been deleted... Cheers, Matthew |
|
From: Russell O. <ro...@uw...> - 2014-10-15 22:19:38
|
I have a polar graph that works fine on linux but is blank on MacOS 10.9. Here is a minimal working example (using the API because it is part of a larger Tkinter application): #!/usr/bin/env python2 import Tkinter import matplotlib from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg root = Tkinter.Tk() root["bg"] = "green" # the green should be hidden by the plot plotFig = matplotlib.figure.Figure(figsize=(5, 5), frameon=False) figCanvas = FigureCanvasTkAgg(plotFig, root) figCanvas.get_tk_widget().pack() axis = plotFig.add_subplot(1, 1, 1, polar=True, autoscale_on=True) r = (0.1, 0.4, 0.6, 0.8) theta = (0, 1.5, 3.0, 4.5) # radians, 0 to right. pi/2 up axis.plot(theta, r, marker="o", markeredgecolor="black", markersize=3) figCanvas.draw() root.mainloop() On MacOS 10.9 when I run this from Terminal I see a green window (rather than the plot I expect). When I click on the plot window to bring it to the front, the window turns white with a thin black border (presumably the plot, but with no content). Details: - matplotlib 1.3.1 - Tcl/Tk 8.5.11 (for good reasons, unfortunately) - python.org python 2.7.6, running in 32-bit mode (due to a known issue with MacOS 10.9 and this old version of Tcl/Tk) Any ideas how to get the plot to show? -- Russell |
|
From: Mark J. <mja...@es...> - 2014-10-15 21:56:25
|
When I replaced the file I got the 1st error below. As you had pointed out earlier… this is strange. It only occurs when you run it more than once… strange indeed… it is like a manager is being created and deleted but perhaps the reference hasn’t… so you get a no-op on the subsequent import.. but are then left with a manager that is None….?? Thanks for the tip BTW… I replaced all my None comparisons to “is” and “is not”. I went ahead and added the comparisons to your changes and it works… but now you need to assure that you do not gc.collect unless you had at least one Non-None manager or else you get the 2nd traceback. The code that works on my end is the last image… not sure if it passes your regression tests..??..?? Thanks so much for all of your help… please let me know if there is anything else I can do to help. MJ [cid:image001.png@01CFE881.FB6CCAF0] [cid:image002.png@01CFE888.2A514840] [cid:image003.png@01CFE888.2A514840] -----Original Message----- From: Thomas Caswell [mailto:tca...@gm...] Sent: Saturday, October 11, 2014 2:18 PM To: Phil Elson Cc: Mark Janikas; Benjamin Root; Matplotlib Users Subject: Re: [Matplotlib-users] FW: traceback when import matplotlib.pyplot twice See https://github.com/matplotlib/matplotlib/pull/3638 That might help to make sure that things tear them selves down in the right order. Tom On Sat, Oct 11, 2014 at 10:12 AM, Phil Elson <pel...@gm...> wrote: > > On 10 October 2014 19:10, Thomas Caswell <tca...@gm...> wrote: >> >> I suspect a better fix is to change all of the staticmethods -> >> classmethods > > > > +1 -- Thomas Caswell tca...@gm... |
|
From: David H. <dh...@gm...> - 2014-10-15 18:09:35
|
For the first question, if I save the figure (as a PNG I'm guessing, unless you can save into a more array-like format), I'd have to make sure that there were no labels or ticks and that the axes fit the whole figure. I'd also have to get the dpi and size information correct, but I suppose it would be possible that way. I was hoping for something a little easier and in-memory. This might be the simplest answer the more I think about it. If I'm starting from the paths, I'd still have to write them to the "grid" array. I thought maybe the backend could do that and I magically get the image. I'll look in to using savefig and getting the data out. -Dave On 10/15/14, 12:42 PM, Joy merwin monteiro wrote: > pardon the query if it seems dumb, but why don't you do a savefig() > after plotting the data and then convert it to any format you like? > > alternatively, contour() and contourf() both create paths that can > be accessed: > > cf = contourf(.....) > > output = cf.collections.pop() > paths = output.get_paths()[i] # for the various contours > > the x,y coordinates can then be accessed as > > xcoords = paths.vertices.transpose()[0] > ycoords = paths.vertices.transpose()[1] > > you can then do whatever you wish with them. > > Joy > > > On Wed, Oct 15, 2014 at 9:11 PM, David Hoese <dh...@gm... > <mailto:dh...@gm...>> wrote: > > I've been searching and reading through source code and google searches > to see if this is possible, but no luck so far. I'm basically trying to > map some data using Basemap, use contourf to map it to an image, and > then put that image in a geotiff (or other format) for use in other GIS > programs. I have other tools for remapping data and creating geotiffs, > but the contour image looks better. All I would need to get this to work > would be an array representing the image inside the axes of a contourf > plot. I found a lot of geotiff -> Basemap png results, but I would like > the reverse. > > Since the plots are made using paths/patches I'm guessing I would have > to have a backend render the image and then extract the image somehow. > Does anyone have some tips or tricks to do something like this? Or am I > thinking about this completely wrong? > > Thanks for any help and if you could CC me in any replies it would be > much appreciated. > > -Dave > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push > notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- > The best ruler, when he finishes his > tasks and completes his affairs, > the people say > “It all happened naturally” > > - Te Tao Ch'ing |
|
From: Joy m. m. <joy...@gm...> - 2014-10-15 17:42:16
|
pardon the query if it seems dumb, but why don't you do a savefig() after plotting the data and then convert it to any format you like? alternatively, contour() and contourf() both create paths that can be accessed: cf = contourf(.....) output = cf.collections.pop() paths = output.get_paths()[i] # for the various contours the x,y coordinates can then be accessed as xcoords = paths.vertices.transpose()[0] ycoords = paths.vertices.transpose()[1] you can then do whatever you wish with them. Joy On Wed, Oct 15, 2014 at 9:11 PM, David Hoese <dh...@gm...> wrote: > I've been searching and reading through source code and google searches > to see if this is possible, but no luck so far. I'm basically trying to > map some data using Basemap, use contourf to map it to an image, and > then put that image in a geotiff (or other format) for use in other GIS > programs. I have other tools for remapping data and creating geotiffs, > but the contour image looks better. All I would need to get this to work > would be an array representing the image inside the axes of a contourf > plot. I found a lot of geotiff -> Basemap png results, but I would like > the reverse. > > Since the plots are made using paths/patches I'm guessing I would have > to have a backend render the image and then extract the image somehow. > Does anyone have some tips or tricks to do something like this? Or am I > thinking about this completely wrong? > > Thanks for any help and if you could CC me in any replies it would be > much appreciated. > > -Dave > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- The best ruler, when he finishes his tasks and completes his affairs, the people say “It all happened naturally” - Te Tao Ch'ing |
|
From: David H. <dh...@gm...> - 2014-10-15 15:41:34
|
I've been searching and reading through source code and google searches to see if this is possible, but no luck so far. I'm basically trying to map some data using Basemap, use contourf to map it to an image, and then put that image in a geotiff (or other format) for use in other GIS programs. I have other tools for remapping data and creating geotiffs, but the contour image looks better. All I would need to get this to work would be an array representing the image inside the axes of a contourf plot. I found a lot of geotiff -> Basemap png results, but I would like the reverse. Since the plots are made using paths/patches I'm guessing I would have to have a backend render the image and then extract the image somehow. Does anyone have some tips or tricks to do something like this? Or am I thinking about this completely wrong? Thanks for any help and if you could CC me in any replies it would be much appreciated. -Dave |
|
From: mrvelle <mr...@gm...> - 2014-10-15 08:34:13
|
On this documentation page: http://matplotlib.org/api/figure_api.html. It says: The following classes are definedSubplotParams control the default spacing of the subplots Figure top level container for all plot elements But actually there are three. The third one is: AxesStack. Or did I misunderstand smth? -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Docs-mention-two-classes-but-actually-has-three-tp44115.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Benjamin R. <ben...@ou...> - 2014-10-14 19:53:41
|
So, you need to know what tools to use to read in grib2 data? There are two particular grib readers that I am familiar with: PyNIO and pygrib2. PyNIO actually isn't a grib reader, as much as a swiss army knife of file readers. It is very similar to the netcdf4 interface, so if you are familiar with that, then PyNIO is very nice in that respect. Unfortunately, PyNIO is not available through pypi. You have to go directly to their website, sign up and download it directly from them. Oh, and may god have mercy on your soul if you have to build from source for either PyNIO or pygrib2... try the binaries if possible. Ben Root On Tue, Oct 14, 2014 at 1:09 AM, Sourav Chatterjee <sr...@gm...> wrote: > Can somebody help me to plot the wind vectors in spstere projection > reading data from a grb2 file *without using Dataset (netcdf4*)? > > Thanks > Sourav > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Slavin, J. <js...@cf...> - 2014-10-14 16:48:39
|
Hi Chris, Thanks for that tip. I'll give it a try. They are big images (2048 x 2048) so it seems like your suggestion should work. Jon On Tue, Oct 14, 2014 at 12:18 PM, Chris Beaumont <cbe...@cf...> wrote: > I've found that, for big images, the *first* draw is very slow, due to the > intensity scaling of the image, which happens at full resolution. Panning > and zooming afterwards is fast because the intensity scaling is cached, but > changing the data array or updating the norm kwarg is slow again. I made > ModestImage (https://github.com/ChrisBeaumont/mpl-modest-image) to deal > with this -- it dynamically downsamples images to screen resolution. This > makes the first draw after updating the data or norm much faster, while > slowing down subsequent redraws. Perhaps this could help you out? > > cheers, > chris > > On Tue, Oct 14, 2014 at 12:08 PM, Benjamin Root <ben...@ou...> wrote: > >> Only if there are multiple figures (plt.draw() operates on the current >> active figure, while fig.draw() explicitly operates upon that figure). >> Another possibility is that the bottleneck truly is the IO. Depending on >> exactly how fits work, it might be lazily loading data for you, so the test >> without the display of the images might not actually be loading any data >> into memory. >> >> Ben Root >> >> On Tue, Oct 14, 2014 at 11:22 AM, Slavin, Jonathan < >> js...@cf...> wrote: >> >>> Hmm. I just saw that you suggest fig.draw(). Is there a difference >>> with plt.draw()? >>> >>> Jon >>> >>> On Tue, Oct 14, 2014 at 11:20 AM, Slavin, Jonathan < >>> js...@cf...> wrote: >>> >>>> Hi Ben, >>>> >>>> Sorry, in my little example, I left out a few things. I do update >>>> first after the first call. And I do call draw() after other calls. So >>>> here is a more accurate representation of what I do: >>>> >>>> first = True >>>> fig = plt.figure() >>>> for file in files: >>>> hdu = fits.open(file) >>>> image = hdu[0].data >>>> hdu.close() >>>> if first: >>>> ax = fig,add_subplot(1,1,1) >>>> im = ax.imshow(image) >>>> plt.show() >>>> first = False >>>> else: >>>> im.set_data(image) >>>> plt.draw() >>>> ans = raw_input('continue?') >>>> if ans == 'n': >>>> break >>>> >>>> Jon >>>> >>>> >>>> On Tue, Oct 14, 2014 at 10:42 AM, Benjamin Root <ben...@ou...> >>>> wrote: >>>> >>>>> Also, you aren't updating "first" after the first call, so it is >>>>> constantly making new axes and recalling imshow(). >>>>> >>>>> Ben Root >>>>> >>>>> On Tue, Oct 14, 2014 at 10:41 AM, Benjamin Root <ben...@ou...> >>>>> wrote: >>>>> >>>>>> What is happening is that you are not telling the image to redraw, so >>>>>> you are only seeing it refresh for other reasons. Try adding a fig.draw() >>>>>> call prior to the raw_input() call. >>>>>> >>>>>> Cheers! >>>>>> Ben Root >>>>>> >>>>>> On Tue, Oct 14, 2014 at 10:03 AM, Slavin, Jonathan < >>>>>> js...@cf...> wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> In my work lately I have often wanted to browse through a series of >>>>>>> images. This means displaying the image(s), looking at it/them and then >>>>>>> continuing. I have coded this in a few different ways, but it is generally >>>>>>> pretty slow -- which is to say that the image display takes more than a >>>>>>> couple seconds (~4) after I tell it to continue to the next image. I >>>>>>> tested the loop without image display and it was a factor of ~80 times >>>>>>> faster than it was with image display, so it's doesn't have anything to do >>>>>>> with reading the images from disk. My latest approach is basically: >>>>>>> first = True >>>>>>> fig = plt.figure() >>>>>>> for file in imagefiles: >>>>>>> # read in image data (fits files) >>>>>>> if first: >>>>>>> ax = fig.add_suplot(1,1,1) >>>>>>> im = ax.imshow(image) >>>>>>> else: >>>>>>> im.set_data(image) >>>>>>> ans = raw_input('continue?') >>>>>>> if ans == 'n': >>>>>>> break >>>>>>> >>>>>>> Is there a more efficient way to do this? >>>>>>> >>>>>>> Regards, >>>>>>> Jon >>>>>>> >>>>>>> -- >>>>>>> ________________________________________________________ >>>>>>> Jonathan D. Slavin Harvard-Smithsonian CfA >>>>>>> js...@cf... 60 Garden Street, MS 83 >>>>>>> phone: (617) 496-7981 Cambridge, MA 02138-1516 >>>>>>> fax: (617) 496-7577 USA >>>>>>> ________________________________________________________ >>>>>>> >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> Comprehensive Server Monitoring with Site24x7. >>>>>>> Monitor 10 servers for $9/Month. >>>>>>> Get alerted through email, SMS, voice calls or mobile push >>>>>>> notifications. >>>>>>> Take corrective actions from your mobile device. >>>>>>> http://p.sf.net/sfu/Zoho >>>>>>> _______________________________________________ >>>>>>> Matplotlib-users mailing list >>>>>>> Mat...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>>> >>>> -- >>>> ________________________________________________________ >>>> Jonathan D. Slavin Harvard-Smithsonian CfA >>>> js...@cf... 60 Garden Street, MS 83 >>>> phone: (617) 496-7981 Cambridge, MA 02138-1516 >>>> fax: (617) 496-7577 USA >>>> ________________________________________________________ >>>> >>>> >>> >>> >>> -- >>> ________________________________________________________ >>> Jonathan D. Slavin Harvard-Smithsonian CfA >>> js...@cf... 60 Garden Street, MS 83 >>> phone: (617) 496-7981 Cambridge, MA 02138-1516 >>> fax: (617) 496-7577 USA >>> ________________________________________________________ >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> http://p.sf.net/sfu/Zoho >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > > -- > ************************************* > Chris Beaumont > Senior Software Engineer > Harvard Center for Astrophysics > 60 Garden Street, MS 42 > Cambridge, MA 02138 > chrisbeaumont.org > ************************************* > -- ________________________________________________________ Jonathan D. Slavin Harvard-Smithsonian CfA js...@cf... 60 Garden Street, MS 83 phone: (617) 496-7981 Cambridge, MA 02138-1516 fax: (617) 496-7577 USA ________________________________________________________ |
|
From: Thomas C. <tca...@gm...> - 2014-10-14 16:40:41
|
I am happy to announce that I have tagged a release candidate for 1.4.1. This is a bug-fix release which fixes most of the bug that popped up in 1.4.0 including: - setup.py does not die when freetype is not installed - reverts the changes to interactive plotting so `ion` will work as expected - sundry unicode fixes (looking up user folders, importing seaborn/pandas/networkx with macosx backend - fixed boxplot regressions The tarball is available from github, sourceforge and can be install via pip install matplotlib==1.4.1rc1 Tom -- Thomas Caswell tca...@gm... |
|
From: Chris B. <cbe...@cf...> - 2014-10-14 16:19:06
|
I've found that, for big images, the *first* draw is very slow, due to the intensity scaling of the image, which happens at full resolution. Panning and zooming afterwards is fast because the intensity scaling is cached, but changing the data array or updating the norm kwarg is slow again. I made ModestImage (https://github.com/ChrisBeaumont/mpl-modest-image) to deal with this -- it dynamically downsamples images to screen resolution. This makes the first draw after updating the data or norm much faster, while slowing down subsequent redraws. Perhaps this could help you out? cheers, chris On Tue, Oct 14, 2014 at 12:08 PM, Benjamin Root <ben...@ou...> wrote: > Only if there are multiple figures (plt.draw() operates on the current > active figure, while fig.draw() explicitly operates upon that figure). > Another possibility is that the bottleneck truly is the IO. Depending on > exactly how fits work, it might be lazily loading data for you, so the test > without the display of the images might not actually be loading any data > into memory. > > Ben Root > > On Tue, Oct 14, 2014 at 11:22 AM, Slavin, Jonathan < > js...@cf...> wrote: > >> Hmm. I just saw that you suggest fig.draw(). Is there a difference with >> plt.draw()? >> >> Jon >> >> On Tue, Oct 14, 2014 at 11:20 AM, Slavin, Jonathan < >> js...@cf...> wrote: >> >>> Hi Ben, >>> >>> Sorry, in my little example, I left out a few things. I do update first >>> after the first call. And I do call draw() after other calls. So here is >>> a more accurate representation of what I do: >>> >>> first = True >>> fig = plt.figure() >>> for file in files: >>> hdu = fits.open(file) >>> image = hdu[0].data >>> hdu.close() >>> if first: >>> ax = fig,add_subplot(1,1,1) >>> im = ax.imshow(image) >>> plt.show() >>> first = False >>> else: >>> im.set_data(image) >>> plt.draw() >>> ans = raw_input('continue?') >>> if ans == 'n': >>> break >>> >>> Jon >>> >>> >>> On Tue, Oct 14, 2014 at 10:42 AM, Benjamin Root <ben...@ou...> wrote: >>> >>>> Also, you aren't updating "first" after the first call, so it is >>>> constantly making new axes and recalling imshow(). >>>> >>>> Ben Root >>>> >>>> On Tue, Oct 14, 2014 at 10:41 AM, Benjamin Root <ben...@ou...> >>>> wrote: >>>> >>>>> What is happening is that you are not telling the image to redraw, so >>>>> you are only seeing it refresh for other reasons. Try adding a fig.draw() >>>>> call prior to the raw_input() call. >>>>> >>>>> Cheers! >>>>> Ben Root >>>>> >>>>> On Tue, Oct 14, 2014 at 10:03 AM, Slavin, Jonathan < >>>>> js...@cf...> wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> In my work lately I have often wanted to browse through a series of >>>>>> images. This means displaying the image(s), looking at it/them and then >>>>>> continuing. I have coded this in a few different ways, but it is generally >>>>>> pretty slow -- which is to say that the image display takes more than a >>>>>> couple seconds (~4) after I tell it to continue to the next image. I >>>>>> tested the loop without image display and it was a factor of ~80 times >>>>>> faster than it was with image display, so it's doesn't have anything to do >>>>>> with reading the images from disk. My latest approach is basically: >>>>>> first = True >>>>>> fig = plt.figure() >>>>>> for file in imagefiles: >>>>>> # read in image data (fits files) >>>>>> if first: >>>>>> ax = fig.add_suplot(1,1,1) >>>>>> im = ax.imshow(image) >>>>>> else: >>>>>> im.set_data(image) >>>>>> ans = raw_input('continue?') >>>>>> if ans == 'n': >>>>>> break >>>>>> >>>>>> Is there a more efficient way to do this? >>>>>> >>>>>> Regards, >>>>>> Jon >>>>>> >>>>>> -- >>>>>> ________________________________________________________ >>>>>> Jonathan D. Slavin Harvard-Smithsonian CfA >>>>>> js...@cf... 60 Garden Street, MS 83 >>>>>> phone: (617) 496-7981 Cambridge, MA 02138-1516 >>>>>> fax: (617) 496-7577 USA >>>>>> ________________________________________________________ >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Comprehensive Server Monitoring with Site24x7. >>>>>> Monitor 10 servers for $9/Month. >>>>>> Get alerted through email, SMS, voice calls or mobile push >>>>>> notifications. >>>>>> Take corrective actions from your mobile device. >>>>>> http://p.sf.net/sfu/Zoho >>>>>> _______________________________________________ >>>>>> Matplotlib-users mailing list >>>>>> Mat...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>>>> >>>>>> >>>>> >>>> >>> >>> >>> -- >>> ________________________________________________________ >>> Jonathan D. Slavin Harvard-Smithsonian CfA >>> js...@cf... 60 Garden Street, MS 83 >>> phone: (617) 496-7981 Cambridge, MA 02138-1516 >>> fax: (617) 496-7577 USA >>> ________________________________________________________ >>> >>> >> >> >> -- >> ________________________________________________________ >> Jonathan D. Slavin Harvard-Smithsonian CfA >> js...@cf... 60 Garden Street, MS 83 >> phone: (617) 496-7981 Cambridge, MA 02138-1516 >> fax: (617) 496-7577 USA >> ________________________________________________________ >> >> > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- ************************************* Chris Beaumont Senior Software Engineer Harvard Center for Astrophysics 60 Garden Street, MS 42 Cambridge, MA 02138 chrisbeaumont.org ************************************* |
|
From: Benjamin R. <ben...@ou...> - 2014-10-14 16:08:40
|
Only if there are multiple figures (plt.draw() operates on the current
active figure, while fig.draw() explicitly operates upon that figure).
Another possibility is that the bottleneck truly is the IO. Depending on
exactly how fits work, it might be lazily loading data for you, so the test
without the display of the images might not actually be loading any data
into memory.
Ben Root
On Tue, Oct 14, 2014 at 11:22 AM, Slavin, Jonathan <js...@cf...>
wrote:
> Hmm. I just saw that you suggest fig.draw(). Is there a difference with
> plt.draw()?
>
> Jon
>
> On Tue, Oct 14, 2014 at 11:20 AM, Slavin, Jonathan <
> js...@cf...> wrote:
>
>> Hi Ben,
>>
>> Sorry, in my little example, I left out a few things. I do update first
>> after the first call. And I do call draw() after other calls. So here is
>> a more accurate representation of what I do:
>>
>> first = True
>> fig = plt.figure()
>> for file in files:
>> hdu = fits.open(file)
>> image = hdu[0].data
>> hdu.close()
>> if first:
>> ax = fig,add_subplot(1,1,1)
>> im = ax.imshow(image)
>> plt.show()
>> first = False
>> else:
>> im.set_data(image)
>> plt.draw()
>> ans = raw_input('continue?')
>> if ans == 'n':
>> break
>>
>> Jon
>>
>>
>> On Tue, Oct 14, 2014 at 10:42 AM, Benjamin Root <ben...@ou...> wrote:
>>
>>> Also, you aren't updating "first" after the first call, so it is
>>> constantly making new axes and recalling imshow().
>>>
>>> Ben Root
>>>
>>> On Tue, Oct 14, 2014 at 10:41 AM, Benjamin Root <ben...@ou...> wrote:
>>>
>>>> What is happening is that you are not telling the image to redraw, so
>>>> you are only seeing it refresh for other reasons. Try adding a fig.draw()
>>>> call prior to the raw_input() call.
>>>>
>>>> Cheers!
>>>> Ben Root
>>>>
>>>> On Tue, Oct 14, 2014 at 10:03 AM, Slavin, Jonathan <
>>>> js...@cf...> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> In my work lately I have often wanted to browse through a series of
>>>>> images. This means displaying the image(s), looking at it/them and then
>>>>> continuing. I have coded this in a few different ways, but it is generally
>>>>> pretty slow -- which is to say that the image display takes more than a
>>>>> couple seconds (~4) after I tell it to continue to the next image. I
>>>>> tested the loop without image display and it was a factor of ~80 times
>>>>> faster than it was with image display, so it's doesn't have anything to do
>>>>> with reading the images from disk. My latest approach is basically:
>>>>> first = True
>>>>> fig = plt.figure()
>>>>> for file in imagefiles:
>>>>> # read in image data (fits files)
>>>>> if first:
>>>>> ax = fig.add_suplot(1,1,1)
>>>>> im = ax.imshow(image)
>>>>> else:
>>>>> im.set_data(image)
>>>>> ans = raw_input('continue?')
>>>>> if ans == 'n':
>>>>> break
>>>>>
>>>>> Is there a more efficient way to do this?
>>>>>
>>>>> Regards,
>>>>> Jon
>>>>>
>>>>> --
>>>>> ________________________________________________________
>>>>> Jonathan D. Slavin Harvard-Smithsonian CfA
>>>>> js...@cf... 60 Garden Street, MS 83
>>>>> phone: (617) 496-7981 Cambridge, MA 02138-1516
>>>>> fax: (617) 496-7577 USA
>>>>> ________________________________________________________
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Comprehensive Server Monitoring with Site24x7.
>>>>> Monitor 10 servers for $9/Month.
>>>>> Get alerted through email, SMS, voice calls or mobile push
>>>>> notifications.
>>>>> Take corrective actions from your mobile device.
>>>>> http://p.sf.net/sfu/Zoho
>>>>> _______________________________________________
>>>>> Matplotlib-users mailing list
>>>>> Mat...@li...
>>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>>
>>>>>
>>>>
>>>
>>
>>
>> --
>> ________________________________________________________
>> Jonathan D. Slavin Harvard-Smithsonian CfA
>> js...@cf... 60 Garden Street, MS 83
>> phone: (617) 496-7981 Cambridge, MA 02138-1516
>> fax: (617) 496-7577 USA
>> ________________________________________________________
>>
>>
>
>
> --
> ________________________________________________________
> Jonathan D. Slavin Harvard-Smithsonian CfA
> js...@cf... 60 Garden Street, MS 83
> phone: (617) 496-7981 Cambridge, MA 02138-1516
> fax: (617) 496-7577 USA
> ________________________________________________________
>
>
|
|
From: Slavin, J. <js...@cf...> - 2014-10-14 15:22:13
|
Hmm. I just saw that you suggest fig.draw(). Is there a difference with
plt.draw()?
Jon
On Tue, Oct 14, 2014 at 11:20 AM, Slavin, Jonathan <js...@cf...>
wrote:
> Hi Ben,
>
> Sorry, in my little example, I left out a few things. I do update first
> after the first call. And I do call draw() after other calls. So here is
> a more accurate representation of what I do:
>
> first = True
> fig = plt.figure()
> for file in files:
> hdu = fits.open(file)
> image = hdu[0].data
> hdu.close()
> if first:
> ax = fig,add_subplot(1,1,1)
> im = ax.imshow(image)
> plt.show()
> first = False
> else:
> im.set_data(image)
> plt.draw()
> ans = raw_input('continue?')
> if ans == 'n':
> break
>
> Jon
>
>
> On Tue, Oct 14, 2014 at 10:42 AM, Benjamin Root <ben...@ou...> wrote:
>
>> Also, you aren't updating "first" after the first call, so it is
>> constantly making new axes and recalling imshow().
>>
>> Ben Root
>>
>> On Tue, Oct 14, 2014 at 10:41 AM, Benjamin Root <ben...@ou...> wrote:
>>
>>> What is happening is that you are not telling the image to redraw, so
>>> you are only seeing it refresh for other reasons. Try adding a fig.draw()
>>> call prior to the raw_input() call.
>>>
>>> Cheers!
>>> Ben Root
>>>
>>> On Tue, Oct 14, 2014 at 10:03 AM, Slavin, Jonathan <
>>> js...@cf...> wrote:
>>>
>>>> Hi all,
>>>>
>>>> In my work lately I have often wanted to browse through a series of
>>>> images. This means displaying the image(s), looking at it/them and then
>>>> continuing. I have coded this in a few different ways, but it is generally
>>>> pretty slow -- which is to say that the image display takes more than a
>>>> couple seconds (~4) after I tell it to continue to the next image. I
>>>> tested the loop without image display and it was a factor of ~80 times
>>>> faster than it was with image display, so it's doesn't have anything to do
>>>> with reading the images from disk. My latest approach is basically:
>>>> first = True
>>>> fig = plt.figure()
>>>> for file in imagefiles:
>>>> # read in image data (fits files)
>>>> if first:
>>>> ax = fig.add_suplot(1,1,1)
>>>> im = ax.imshow(image)
>>>> else:
>>>> im.set_data(image)
>>>> ans = raw_input('continue?')
>>>> if ans == 'n':
>>>> break
>>>>
>>>> Is there a more efficient way to do this?
>>>>
>>>> Regards,
>>>> Jon
>>>>
>>>> --
>>>> ________________________________________________________
>>>> Jonathan D. Slavin Harvard-Smithsonian CfA
>>>> js...@cf... 60 Garden Street, MS 83
>>>> phone: (617) 496-7981 Cambridge, MA 02138-1516
>>>> fax: (617) 496-7577 USA
>>>> ________________________________________________________
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Comprehensive Server Monitoring with Site24x7.
>>>> Monitor 10 servers for $9/Month.
>>>> Get alerted through email, SMS, voice calls or mobile push
>>>> notifications.
>>>> Take corrective actions from your mobile device.
>>>> http://p.sf.net/sfu/Zoho
>>>> _______________________________________________
>>>> Matplotlib-users mailing list
>>>> Mat...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>
>>>>
>>>
>>
>
>
> --
> ________________________________________________________
> Jonathan D. Slavin Harvard-Smithsonian CfA
> js...@cf... 60 Garden Street, MS 83
> phone: (617) 496-7981 Cambridge, MA 02138-1516
> fax: (617) 496-7577 USA
> ________________________________________________________
>
>
--
________________________________________________________
Jonathan D. Slavin Harvard-Smithsonian CfA
js...@cf... 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
fax: (617) 496-7577 USA
________________________________________________________
|
|
From: Slavin, J. <js...@cf...> - 2014-10-14 15:20:56
|
Hi Ben,
Sorry, in my little example, I left out a few things. I do update first
after the first call. And I do call draw() after other calls. So here is
a more accurate representation of what I do:
first = True
fig = plt.figure()
for file in files:
hdu = fits.open(file)
image = hdu[0].data
hdu.close()
if first:
ax = fig,add_subplot(1,1,1)
im = ax.imshow(image)
plt.show()
first = False
else:
im.set_data(image)
plt.draw()
ans = raw_input('continue?')
if ans == 'n':
break
Jon
On Tue, Oct 14, 2014 at 10:42 AM, Benjamin Root <ben...@ou...> wrote:
> Also, you aren't updating "first" after the first call, so it is
> constantly making new axes and recalling imshow().
>
> Ben Root
>
> On Tue, Oct 14, 2014 at 10:41 AM, Benjamin Root <ben...@ou...> wrote:
>
>> What is happening is that you are not telling the image to redraw, so you
>> are only seeing it refresh for other reasons. Try adding a fig.draw() call
>> prior to the raw_input() call.
>>
>> Cheers!
>> Ben Root
>>
>> On Tue, Oct 14, 2014 at 10:03 AM, Slavin, Jonathan <
>> js...@cf...> wrote:
>>
>>> Hi all,
>>>
>>> In my work lately I have often wanted to browse through a series of
>>> images. This means displaying the image(s), looking at it/them and then
>>> continuing. I have coded this in a few different ways, but it is generally
>>> pretty slow -- which is to say that the image display takes more than a
>>> couple seconds (~4) after I tell it to continue to the next image. I
>>> tested the loop without image display and it was a factor of ~80 times
>>> faster than it was with image display, so it's doesn't have anything to do
>>> with reading the images from disk. My latest approach is basically:
>>> first = True
>>> fig = plt.figure()
>>> for file in imagefiles:
>>> # read in image data (fits files)
>>> if first:
>>> ax = fig.add_suplot(1,1,1)
>>> im = ax.imshow(image)
>>> else:
>>> im.set_data(image)
>>> ans = raw_input('continue?')
>>> if ans == 'n':
>>> break
>>>
>>> Is there a more efficient way to do this?
>>>
>>> Regards,
>>> Jon
>>>
>>> --
>>> ________________________________________________________
>>> Jonathan D. Slavin Harvard-Smithsonian CfA
>>> js...@cf... 60 Garden Street, MS 83
>>> phone: (617) 496-7981 Cambridge, MA 02138-1516
>>> fax: (617) 496-7577 USA
>>> ________________________________________________________
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Comprehensive Server Monitoring with Site24x7.
>>> Monitor 10 servers for $9/Month.
>>> Get alerted through email, SMS, voice calls or mobile push notifications.
>>> Take corrective actions from your mobile device.
>>> http://p.sf.net/sfu/Zoho
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>
>
--
________________________________________________________
Jonathan D. Slavin Harvard-Smithsonian CfA
js...@cf... 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
fax: (617) 496-7577 USA
________________________________________________________
|
|
From: Benjamin R. <ben...@ou...> - 2014-10-14 14:42:40
|
Also, you aren't updating "first" after the first call, so it is constantly
making new axes and recalling imshow().
Ben Root
On Tue, Oct 14, 2014 at 10:41 AM, Benjamin Root <ben...@ou...> wrote:
> What is happening is that you are not telling the image to redraw, so you
> are only seeing it refresh for other reasons. Try adding a fig.draw() call
> prior to the raw_input() call.
>
> Cheers!
> Ben Root
>
> On Tue, Oct 14, 2014 at 10:03 AM, Slavin, Jonathan <
> js...@cf...> wrote:
>
>> Hi all,
>>
>> In my work lately I have often wanted to browse through a series of
>> images. This means displaying the image(s), looking at it/them and then
>> continuing. I have coded this in a few different ways, but it is generally
>> pretty slow -- which is to say that the image display takes more than a
>> couple seconds (~4) after I tell it to continue to the next image. I
>> tested the loop without image display and it was a factor of ~80 times
>> faster than it was with image display, so it's doesn't have anything to do
>> with reading the images from disk. My latest approach is basically:
>> first = True
>> fig = plt.figure()
>> for file in imagefiles:
>> # read in image data (fits files)
>> if first:
>> ax = fig.add_suplot(1,1,1)
>> im = ax.imshow(image)
>> else:
>> im.set_data(image)
>> ans = raw_input('continue?')
>> if ans == 'n':
>> break
>>
>> Is there a more efficient way to do this?
>>
>> Regards,
>> Jon
>>
>> --
>> ________________________________________________________
>> Jonathan D. Slavin Harvard-Smithsonian CfA
>> js...@cf... 60 Garden Street, MS 83
>> phone: (617) 496-7981 Cambridge, MA 02138-1516
>> fax: (617) 496-7577 USA
>> ________________________________________________________
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Comprehensive Server Monitoring with Site24x7.
>> Monitor 10 servers for $9/Month.
>> Get alerted through email, SMS, voice calls or mobile push notifications.
>> Take corrective actions from your mobile device.
>> http://p.sf.net/sfu/Zoho
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
|
|
From: Benjamin R. <ben...@ou...> - 2014-10-14 14:41:47
|
What is happening is that you are not telling the image to redraw, so you
are only seeing it refresh for other reasons. Try adding a fig.draw() call
prior to the raw_input() call.
Cheers!
Ben Root
On Tue, Oct 14, 2014 at 10:03 AM, Slavin, Jonathan <js...@cf...>
wrote:
> Hi all,
>
> In my work lately I have often wanted to browse through a series of
> images. This means displaying the image(s), looking at it/them and then
> continuing. I have coded this in a few different ways, but it is generally
> pretty slow -- which is to say that the image display takes more than a
> couple seconds (~4) after I tell it to continue to the next image. I
> tested the loop without image display and it was a factor of ~80 times
> faster than it was with image display, so it's doesn't have anything to do
> with reading the images from disk. My latest approach is basically:
> first = True
> fig = plt.figure()
> for file in imagefiles:
> # read in image data (fits files)
> if first:
> ax = fig.add_suplot(1,1,1)
> im = ax.imshow(image)
> else:
> im.set_data(image)
> ans = raw_input('continue?')
> if ans == 'n':
> break
>
> Is there a more efficient way to do this?
>
> Regards,
> Jon
>
> --
> ________________________________________________________
> Jonathan D. Slavin Harvard-Smithsonian CfA
> js...@cf... 60 Garden Street, MS 83
> phone: (617) 496-7981 Cambridge, MA 02138-1516
> fax: (617) 496-7577 USA
> ________________________________________________________
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Slavin, J. <js...@cf...> - 2014-10-14 14:32:31
|
Hi all,
In my work lately I have often wanted to browse through a series of
images. This means displaying the image(s), looking at it/them and then
continuing. I have coded this in a few different ways, but it is generally
pretty slow -- which is to say that the image display takes more than a
couple seconds (~4) after I tell it to continue to the next image. I
tested the loop without image display and it was a factor of ~80 times
faster than it was with image display, so it's doesn't have anything to do
with reading the images from disk. My latest approach is basically:
first = True
fig = plt.figure()
for file in imagefiles:
# read in image data (fits files)
if first:
ax = fig.add_suplot(1,1,1)
im = ax.imshow(image)
else:
im.set_data(image)
ans = raw_input('continue?')
if ans == 'n':
break
Is there a more efficient way to do this?
Regards,
Jon
--
________________________________________________________
Jonathan D. Slavin Harvard-Smithsonian CfA
js...@cf... 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
fax: (617) 496-7577 USA
________________________________________________________
|