SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S





1
(14)
2
(11)
3
(5)
4
(17)
5
(11)
6
(37)
7
(35)
8
(9)
9
(1)
10
(9)
11
(7)
12
(22)
13
(34)
14
(24)
15
(27)
16
(13)
17
(19)
18
(43)
19
(36)
20
(12)
21
(9)
22
(21)
23
(3)
24
(5)
25
(30)
26
(14)
27
(23)
28
(19)
29
(19)
30
(10)
31
(6)






Showing results of 523

<< < 1 .. 17 18 19 20 21 > >> (Page 19 of 21)
From: Eric F. <ef...@ha...> - 2009年05月06日 18:57:17
Thomas Robitaille wrote:
> Hi Mike,
> 
> Thanks for pointing this out - I hadn't noticed the offsets argument. 
> I'll try it out!
See
http://matplotlib.sourceforge.net/examples/pylab_examples/ellipse_collection.html
Eric
> 
> Cheers,
> 
> Tom
> 
> On May 6, 2009, at 10:39 AM, Michael Droettboom wrote:
> 
>> "offsets" is intended to work for this. Is it broken?
>>
>> Cheers,
>> Mike
>>
>> Thomas Robitaille wrote:
>>> Hi,
>>>
>>> I noticed that it's not possible to specify the position of the 
>>> ellipses in an EllipseCollection:
>>>
>>> http://matplotlib.sourceforge.net/api/collections_api.html?highlight=ellipsecollection#matplotlib.collections.EllipseCollection
>>>
>>> Of course, I can just create a collection of individual Ellipse 
>>> patches, but was just wondering whether the lack of an xy argument 
>>> to EllipseCollection was an oversight?
>>>
>>> Thanks,
>>>
>>> Thomas
>>>
>>> ------------------------------------------------------------------------------
>>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! 
>>> Your
>>> production scanning environment may not be a perfect world - but 
>>> thanks to
>>> Kodak, there's a perfect scanner to get the job done! With the NEW 
>>> KODAK i700
>>> Series Scanner you'll get full speed at 300 dpi even with all image 
>>> processing features enabled. http://p.sf.net/sfu/kodak-com
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>> -- 
>> Michael Droettboom
>> Science Software Branch
>> Operations and Engineering Division
>> Space Telescope Science Institute
>> Operated by AURA for NASA
>>
> 
> 
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Eric F. <ef...@ha...> - 2009年05月06日 18:54:04
Jae-Joon Lee wrote:
> On Wed, May 6, 2009 at 9:49 AM, Sebastian Pająk <spc...@gm...> wrote:
>> Hello
>>
>> How can I set decade on log x axis to be equal length to decade on log
>> y axis (physically)?
>>
>> If I make:
>>
>> ax.set_xscale("log")
>> ax.set_yscale("log")
>> ax.set_aspect(1)
>>
>> I get it all wrong, the units are equal, not decades!!
>>
>> I need the same effect as I get in Gnuplot - the square decades:
>>
>> set logscale yx;
>> set size ratio -1;
>>
>> How can I do it in matplotlib?
>>
> 
> 
> I'm afraid that this is not directly supported by the matplotlib,
> although I think it should.
> However, you can do it with some monkey patching (or with some other
> similar way).
> 
> 
> import math
> 
> def get_data_ratio(self):
> xmin,xmax = self.get_xbound()
> ymin,ymax = self.get_ybound()
> 
> if self.get_xscale() == "log" and self.get_yscale() == "log":
> xsize = max(math.fabs(math.log10(xmax)-math.log10(xmin)), 1e-30)
> ysize = max(math.fabs(math.log10(ymax)-math.log10(ymin)), 1e-30)
> else:
> xsize = max(math.fabs(xmax-xmin), 1e-30)
> ysize = max(math.fabs(ymax-ymin), 1e-30)
> 
> return ysize/xsize
> 
> from matplotlib.axes import Axes
> Axes.get_data_ratio = get_data_ratio
> 
> 
> ax = gca()
> 
> ax.set_xscale("log")
> ax.set_yscale("log")
> ax.set_aspect(1.)
> 
> ax.set_xlim(1, 100)
> ax.set_ylim(1, 1000)
> 
> 
> 
> John and others,
> How do you think this being a default behavior?
Jae-Joon,
Offhand, it looks like a good idea; the current behavior is quite 
useless and surprising for a loglog plot.
There are potentially many cases to consider, and probably only those 
with both axes being log with the same base can be handled reasonably 
with an aspect value other than 'auto'. Maybe cases that cannot be 
handled (e.g. semilog*; anything with symmetric log scales except with 
symmetric x and y bounds) should raise at least a warning in 
apply_aspect, saying that the aspect ratio is being ignored.
Eric
From: Ryan M. <rm...@gm...> - 2009年05月06日 18:15:28
On Wed, May 6, 2009 at 8:53 AM, Robert Cimrman <cim...@nt...> wrote:
> Ryan May wrote:
>
>> On Wed, May 6, 2009 at 7:57 AM, Robert Cimrman <cim...@nt...>
>> wrote:
>>
>>>
>>> Just for the record: Ryan May's example in this thread, that uses pipes,
>>> inspired me to try pipes as well, instead of queues
>>> (multiprocessing.Pipe instead of Queue) and the "hanging problem", i.e.
>>> the problem that Ctrl-C interrupted the program, but it had to be killed
>>> to stop, disappeared. I can fix the script that I sent in message [1]
>>> and provide it, if there is interest. (Currently I have fixed only the
>>> version that is within sfepy).
>>>
>>
>>
>> I know I'd be interested. With your permission, it might make a nice
>> example as well.
>>
>
> Permission granted :) I have sent the script in response to William.
>
>
Done. I like the fact that with your example, everything is self-contained
in a single script.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
From: Ryan M. <rm...@gm...> - 2009年05月06日 18:06:05
2009年5月6日 Carlos "Guâno" Grohmann <car...@gm...>
> Dears, I was wondering if I can use a custom colortable in a
> histogram, to get something like this:
>
> http://grass.itc.it/grass64/manuals/htm/r_surf_gauss_hist.png<http://grass.itc.it/grass64/manuals/html64_user/r_surf_gauss_hist.png>
Not directly, but you could do it by hand. hist returns (among other
things) a list of rectangle patches that represent all the bars. You could
set the face/edge color of each of the patches based on the value of the
histogram. This example appears to do what you want:
http://matplotlib.sourceforge.net/examples/pylab_examples/hist_colormapped.html
For the other devs:
This would be easier if hist just returned a collection of rectangles. Why
again does histogram just use a list of rectangles?
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Elan P. <ep...@gm...> - 2009年05月06日 18:05:56
Attachments: anim.py
Hi,
I can't get wxpython to play well with matplotlib and draw_artist.
After mucking around quite a bit I think I narrowed it down to the
draw_artist function The problem seems to be that draw_artist when
working within wxpython (as opposed to a simple mpl window) doesn't
remove the old points it plotted. I adapted the example from the
cookbook (http://www.scipy.org/Cookbook/Matplotlib/Animations) to
illustrate this problem. I modified the example so it is updated on
mouse movements (followed by idle time) so that the problem is more
visual.
Replacing the copy_from_bbox/restore/draw_artist (i.e. removing the
animated properties) with the simple draw causes this to work. The
copy_from_bbox/restore methods work as expected so it seems that the
problem is either the draw_artist (or possibly the blit, but that
seems unlikely).
Is there something I am doing wrong?
Elan
-- 
Beware of bugs in the above code; I have only proved it correct, not tried it.
- Donald Knuth
From: Sebastian P. <spc...@gm...> - 2009年05月06日 17:31:15
Thanks a lot!. I don't understand it but It works now as it should.
2009年5月6日 Jae-Joon Lee <lee...@gm...>:
> On Wed, May 6, 2009 at 9:49 AM, Sebastian Pająk <spc...@gm...> wrote:
>> Hello
>>
>> How can I set decade on log x axis to be equal length to decade on log
>> y axis (physically)?
>>
>> If I make:
>>
>> ax.set_xscale("log")
>> ax.set_yscale("log")
>> ax.set_aspect(1)
>>
>> I get it all wrong, the units are equal, not decades!!
>>
>> I need the same effect as I get in Gnuplot - the square decades:
>>
>> set logscale yx;
>> set size ratio -1;
>>
>> How can I do it in matplotlib?
>>
>
>
> I'm afraid that this is not directly supported by the matplotlib,
> although I think it should.
> However, you can do it with some monkey patching (or with some other
> similar way).
>
>
> import math
>
> def get_data_ratio(self):
>  xmin,xmax = self.get_xbound()
>  ymin,ymax = self.get_ybound()
>
>  if self.get_xscale() == "log" and self.get_yscale() == "log":
>    xsize = max(math.fabs(math.log10(xmax)-math.log10(xmin)), 1e-30)
>    ysize = max(math.fabs(math.log10(ymax)-math.log10(ymin)), 1e-30)
>  else:
>    xsize = max(math.fabs(xmax-xmin), 1e-30)
>    ysize = max(math.fabs(ymax-ymin), 1e-30)
>
>  return ysize/xsize
>
> from matplotlib.axes import Axes
> Axes.get_data_ratio = get_data_ratio
>
>
> ax = gca()
>
> ax.set_xscale("log")
> ax.set_yscale("log")
> ax.set_aspect(1.)
>
> ax.set_xlim(1, 100)
> ax.set_ylim(1, 1000)
>
>
>
> John and others,
> How do you think this being a default behavior?
>
> Regards,
>
> -JJ
>
>
>
>> ------------------------------------------------------------------------------
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
>> Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
From: Carlos G. G. <car...@gm...> - 2009年05月06日 16:31:16
Dears, I was wondering if I can use a custom colortable in a
histogram, to get something like this:
http://grass.itc.it/grass64/manuals/html64_user/r_surf_gauss_hist.png
thanks
-- 
Carlos Henrique Grohmann - Geologist D.Sc.
a.k.a. Guano - Linux User #89721
ResearcherID: A-9030-2008
carlos dot grohmann at gmail dot com
http://www.igc.usp.br/pessoais/guano/
_________________
"Good morning, doctors. I have taken the liberty of removing Windows
95 from my hard drive."
--The winning entry in a "What were HAL's first words" contest judged
by 2001: A SPACE ODYSSEY creator Arthur C. Clarke
Can’t stop the signal.
From: Jae-Joon L. <lee...@gm...> - 2009年05月06日 16:17:59
On Wed, May 6, 2009 at 9:49 AM, Sebastian Pająk <spc...@gm...> wrote:
> Hello
>
> How can I set decade on log x axis to be equal length to decade on log
> y axis (physically)?
>
> If I make:
>
> ax.set_xscale("log")
> ax.set_yscale("log")
> ax.set_aspect(1)
>
> I get it all wrong, the units are equal, not decades!!
>
> I need the same effect as I get in Gnuplot - the square decades:
>
> set logscale yx;
> set size ratio -1;
>
> How can I do it in matplotlib?
>
I'm afraid that this is not directly supported by the matplotlib,
although I think it should.
However, you can do it with some monkey patching (or with some other
similar way).
import math
def get_data_ratio(self):
 xmin,xmax = self.get_xbound()
 ymin,ymax = self.get_ybound()
 if self.get_xscale() == "log" and self.get_yscale() == "log":
 xsize = max(math.fabs(math.log10(xmax)-math.log10(xmin)), 1e-30)
 ysize = max(math.fabs(math.log10(ymax)-math.log10(ymin)), 1e-30)
 else:
 xsize = max(math.fabs(xmax-xmin), 1e-30)
 ysize = max(math.fabs(ymax-ymin), 1e-30)
 return ysize/xsize
from matplotlib.axes import Axes
Axes.get_data_ratio = get_data_ratio
ax = gca()
ax.set_xscale("log")
ax.set_yscale("log")
ax.set_aspect(1.)
ax.set_xlim(1, 100)
ax.set_ylim(1, 1000)
John and others,
How do you think this being a default behavior?
Regards,
-JJ
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Thomas R. <tho...@gm...> - 2009年05月06日 14:44:27
Hello,
The following code should produce identical plots, but in the second 
case the alpha value is ignored:
---
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as mpl
from matplotlib.patches import Ellipse
from matplotlib.collections import PatchCollection
fig = mpl.figure()
ax = fig.add_subplot(111)
ax.add_patch(Ellipse((0.5,0.5),0.7,0.3,angle=30,alpha=0.3))
fig.savefig('test1.png')
fig = mpl.figure()
ax = fig.add_subplot(111)
ax.add_collection(PatchCollection([Ellipse((0.5,0.5), 
0.7,0.3,angle=30,alpha=0.3)],match_original=True))
fig.savefig('test2.png
---
Is this a bug? I'm using the latest svn version of matplotlib.
Thanks,
Thomas
From: Thomas R. <tho...@gm...> - 2009年05月06日 14:41:25
Hi Mike,
Thanks for pointing this out - I hadn't noticed the offsets argument. 
I'll try it out!
Cheers,
Tom
On May 6, 2009, at 10:39 AM, Michael Droettboom wrote:
> "offsets" is intended to work for this. Is it broken?
>
> Cheers,
> Mike
>
> Thomas Robitaille wrote:
>> Hi,
>>
>> I noticed that it's not possible to specify the position of the 
>> ellipses in an EllipseCollection:
>>
>> http://matplotlib.sourceforge.net/api/collections_api.html?highlight=ellipsecollection#matplotlib.collections.EllipseCollection
>>
>> Of course, I can just create a collection of individual Ellipse 
>> patches, but was just wondering whether the lack of an xy argument 
>> to EllipseCollection was an oversight?
>>
>> Thanks,
>>
>> Thomas
>>
>> ------------------------------------------------------------------------------
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! 
>> Your
>> production scanning environment may not be a perfect world - but 
>> thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW 
>> KODAK i700
>> Series Scanner you'll get full speed at 300 dpi even with all image 
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
> -- 
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
From: Michael D. <md...@st...> - 2009年05月06日 14:40:01
"offsets" is intended to work for this. Is it broken?
Cheers,
Mike
Thomas Robitaille wrote:
> Hi,
>
> I noticed that it's not possible to specify the position of the 
> ellipses in an EllipseCollection:
>
> http://matplotlib.sourceforge.net/api/collections_api.html?highlight=ellipsecollection#matplotlib.collections.EllipseCollection
>
> Of course, I can just create a collection of individual Ellipse 
> patches, but was just wondering whether the lack of an xy argument to 
> EllipseCollection was an oversight?
>
> Thanks,
>
> Thomas
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Thomas R. <tho...@gm...> - 2009年05月06日 14:34:05
Hi,
I noticed that it's not possible to specify the position of the 
ellipses in an EllipseCollection:
http://matplotlib.sourceforge.net/api/collections_api.html?highlight=ellipsecollection#matplotlib.collections.EllipseCollection
Of course, I can just create a collection of individual Ellipse 
patches, but was just wondering whether the lack of an xy argument to 
EllipseCollection was an oversight?
Thanks,
Thomas
From: Sebastian P. <spc...@gm...> - 2009年05月06日 14:18:29
Hello
How can I set decade on log x axis to be equal length to decade on log
y axis (physically)?
If I make:
ax.set_xscale("log")
ax.set_yscale("log")
ax.set_aspect(1)
I get it all wrong, the units are equal, not decades!!
I need the same effect as I get in Gnuplot - the square decades:
set logscale yx;
set size ratio -1;
How can I do it in matplotlib?
From: Robert C. <cim...@nt...> - 2009年05月06日 14:05:33
Attachments: log.py
william ratcliff wrote:
> I'd like to see it ;>
Here you are...
r.
From: Robert C. <cim...@nt...> - 2009年05月06日 14:00:34
Ryan May wrote:
> On Wed, May 6, 2009 at 7:57 AM, Robert Cimrman <cim...@nt...> wrote:
>>
>> Just for the record: Ryan May's example in this thread, that uses pipes,
>> inspired me to try pipes as well, instead of queues
>> (multiprocessing.Pipe instead of Queue) and the "hanging problem", i.e.
>> the problem that Ctrl-C interrupted the program, but it had to be killed
>> to stop, disappeared. I can fix the script that I sent in message [1]
>> and provide it, if there is interest. (Currently I have fixed only the
>> version that is within sfepy).
> 
> 
> I know I'd be interested. With your permission, it might make a nice
> example as well.
Permission granted :) I have sent the script in response to William.
r.
From: william r. <wil...@gm...> - 2009年05月06日 13:59:10
I'd like to see it ;>
On Wed, May 6, 2009 at 8:57 AM, Robert Cimrman <cim...@nt...> wrote:
> Robert Cimrman wrote:
> > Hi Ryan,
> >
> > Ryan May wrote:
> >> On Thu, Apr 23, 2009 at 4:16 PM, Esmail <eb...@ho...> wrote:
> >>
> >>> Ryan May wrote:
> >>>> Try this:
> >>>>
> >>>>
> >>>
> http://matplotlib.sourceforge.net/examples/animation/simple_anim_gtk.html
> >>>> (If not gtk, there are other examples there.)
> >>> Thanks Ryan, that'll give me some idea with regard to the animation,
> >>> and real-time drawings.
> >>>
> >>> Any idea if it's possible to finish a Python program but still have the
> >>> graph showing?
> >>>
> >>> FWIW, I'm doing this under Linux.
> >>>
> >> You'd have to run the plotting in a separate process from the
> computation.
> >> subprocess would let you do that, assuming you can spin off a child task
> >> that stays alive when the parent exits. You'd also need to get the
> >> computing process to give new results to the child plot, maybe using a
> pipe
> >> (which I think subprocess can handle as well.)
> >
> > This is exactly what I have tried/described in [1], using the
> > multiprocessing module. It sort of works, but I have that hanging
> > problem at the end - maybe somebody jumps in and helps this time :)
> >
> > r.
> >
> > [1]
> >
> http://www.mail-archive.com/mat...@li.../msg10873.html
>
> Just for the record: Ryan May's example in this thread, that uses pipes,
> inspired me to try pipes as well, instead of queues
> (multiprocessing.Pipe instead of Queue) and the "hanging problem", i.e.
> the problem that Ctrl-C interrupted the program, but it had to be killed
> to stop, disappeared. I can fix the script that I sent in message [1]
> and provide it, if there is interest. (Currently I have fixed only the
> version that is within sfepy).
>
> thanks!
> r.
>
> [1] [Matplotlib-users] plotting in a separate process, 31.03.2009
>
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
> i700
> Series Scanner you'll get full speed at 300 dpi even with all image
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Ryan M. <rm...@gm...> - 2009年05月06日 13:56:31
On Wed, May 6, 2009 at 7:57 AM, Robert Cimrman <cim...@nt...> wrote:
> Robert Cimrman wrote:
> > Hi Ryan,
> >
> > Ryan May wrote:
> >> On Thu, Apr 23, 2009 at 4:16 PM, Esmail <eb...@ho...> wrote:
> >>
> >>> Ryan May wrote:
> >>>> Try this:
> >>>>
> >>>>
> >>>
> http://matplotlib.sourceforge.net/examples/animation/simple_anim_gtk.html
> >>>> (If not gtk, there are other examples there.)
> >>> Thanks Ryan, that'll give me some idea with regard to the animation,
> >>> and real-time drawings.
> >>>
> >>> Any idea if it's possible to finish a Python program but still have the
> >>> graph showing?
> >>>
> >>> FWIW, I'm doing this under Linux.
> >>>
> >> You'd have to run the plotting in a separate process from the
> computation.
> >> subprocess would let you do that, assuming you can spin off a child task
> >> that stays alive when the parent exits. You'd also need to get the
> >> computing process to give new results to the child plot, maybe using a
> pipe
> >> (which I think subprocess can handle as well.)
> >
> > This is exactly what I have tried/described in [1], using the
> > multiprocessing module. It sort of works, but I have that hanging
> > problem at the end - maybe somebody jumps in and helps this time :)
> >
> > r.
> >
> > [1]
> >
> http://www.mail-archive.com/mat...@li.../msg10873.html
>
> Just for the record: Ryan May's example in this thread, that uses pipes,
> inspired me to try pipes as well, instead of queues
> (multiprocessing.Pipe instead of Queue) and the "hanging problem", i.e.
> the problem that Ctrl-C interrupted the program, but it had to be killed
> to stop, disappeared. I can fix the script that I sent in message [1]
> and provide it, if there is interest. (Currently I have fixed only the
> version that is within sfepy).
I know I'd be interested. With your permission, it might make a nice
example as well.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
From: Robert C. <cim...@nt...> - 2009年05月06日 12:58:40
Robert Cimrman wrote:
> Hi Ryan,
> 
> Ryan May wrote:
>> On Thu, Apr 23, 2009 at 4:16 PM, Esmail <eb...@ho...> wrote:
>>
>>> Ryan May wrote:
>>>> Try this:
>>>>
>>>>
>>> http://matplotlib.sourceforge.net/examples/animation/simple_anim_gtk.html
>>>> (If not gtk, there are other examples there.)
>>> Thanks Ryan, that'll give me some idea with regard to the animation,
>>> and real-time drawings.
>>>
>>> Any idea if it's possible to finish a Python program but still have the
>>> graph showing?
>>>
>>> FWIW, I'm doing this under Linux.
>>>
>> You'd have to run the plotting in a separate process from the computation.
>> subprocess would let you do that, assuming you can spin off a child task
>> that stays alive when the parent exits. You'd also need to get the
>> computing process to give new results to the child plot, maybe using a pipe
>> (which I think subprocess can handle as well.)
> 
> This is exactly what I have tried/described in [1], using the 
> multiprocessing module. It sort of works, but I have that hanging 
> problem at the end - maybe somebody jumps in and helps this time :)
> 
> r.
> 
> [1] 
> http://www.mail-archive.com/mat...@li.../msg10873.html
Just for the record: Ryan May's example in this thread, that uses pipes, 
inspired me to try pipes as well, instead of queues 
(multiprocessing.Pipe instead of Queue) and the "hanging problem", i.e. 
the problem that Ctrl-C interrupted the program, but it had to be killed 
to stop, disappeared. I can fix the script that I sent in message [1] 
and provide it, if there is interest. (Currently I have fixed only the 
version that is within sfepy).
thanks!
r.
[1] [Matplotlib-users] plotting in a separate process, 31.03.2009
From: william r. <wil...@gm...> - 2009年05月05日 21:20:33
Hi! Quick question about pylab.annotate:
Is it supposed to take keyword args such as fontsize?
Thanks,
William
From: Alan G I. <ala...@gm...> - 2009年05月05日 19:15:04
> Alan said:
>> Ideally I'd be able to do something like 
>> lgd.set_items(lgd.get_items()[slice])
On 5/5/2009 1:35 PM Jae-Joon Lee apparently wrote:
> It is quite hard to modify the order of items once the legend is created. 
> Thus, I recommend you to order your items before creating the legend. 
> For example, 
> ax = subplot(111)
> ... plot some lines
> lines = ax.get_lines()
> labels = [l.get_label() for l in lines]
> legend(lines[::-1], labels[::-1]
> I just committed some changes to the svn which makes this kind of 
> thing more handy. The legend guide is also updated with this. 
> http://dl.getdropbox.com/u/178748/mpl/legend_guid/html/legend.html#adjusting-the-order-of-legend-items 
Cool. Also, the way you demo above beats the
approach I took, so thanks for that too.
Alan
From: Alan G I. <ala...@gm...> - 2009年05月05日 19:09:26
> Alan G Isaac wrote:
>> I'm not understanding facecolor and edgecolor. 
>> In the code below (on Windows, with TkAgg)
>> I get the facecolor displayed [onscreen] but not the 
>> edgecolor, and the saved figure shows *neither*. Why? 
>> (version is 0.98.1)
On 5/5/2009 2:48 PM Eric Firing apparently wrote:
> It looks to me like a bug plus a feature. The bug is that in the screen 
> display, the edgecolor can get lost, presumably clipped. On my system 
> (linux, gtkagg) the edgecolor is visible only along the top. 
> The feature is that by design, the figure edgecolor and facecolor have 
> to be specified separately for saving versus screen display. This 
> prevents the screen default grey background from being printed. Maybe 
> there needs to be a savefig option, possibly set via rcParams, to defeat 
> this behavior and simply use the screen settings. At present, you can 
> set the savefig colors in rcParams or via savefig kwargs. Is this adequate? 
OK, we agree that edge color can be lost in onscreen
display, apparently a bug in figure clipping.
Now for the "feature".
I did notice that savefig takes keyword args allowing
us to set facecolor and edgecolor. I would call this
"adequate" in some sense, but it is confusing. It is too
implicit; I was not able to easily determine why may
changes to the **figure** did not affect the file. (Note
that I may not even view an onscreen display for some figures.)
So I do not think it is a problem that the screen display
and savefig have different defaults, presumably invoked but
a default of None. But if the user sets the figure values,
this should override the defaults (in both cases).
Does that seem right?
Thank you,
Alan
From: Eric F. <ef...@ha...> - 2009年05月05日 18:49:04
Alan G Isaac wrote:
> I'm not understanding facecolor and edgecolor.
> In the code below (on Windows, with TkAgg)
> I get the facecolor displayed but not the
> edgecolor, and the saved figure shows *neither*.
> Why? (version is 0.98.1)
It looks to me like a bug plus a feature. The bug is that in the screen 
display, the edgecolor can get lost, presumably clipped. On my system 
(linux, gtkagg) the edgecolor is visible only along the top.
The feature is that by design, the figure edgecolor and facecolor have 
to be specified separately for saving versus screen display. This 
prevents the screen default grey background from being printed. Maybe 
there needs to be a savefig option, possibly set via rcParams, to defeat 
this behavior and simply use the screen settings. At present, you can 
set the savefig colors in rcParams or via savefig kwargs. Is this adequate?
Eric
> 
> Thanks,
> Alan Isaac
> 
> import matplotlib.pyplot as plt
> import numpy as np
> 
> fig1 = plt.figure(1)
> fig1.set_frameon(True)
> fig1.set_facecolor('r')
> fig1.set_edgecolor('b')
> 
> ax1 = fig1.gca()
> ax1.plot([1,2,3])
> 
> fig1.savefig('c:/temp/temp.eps')
> 
> plt.show()
> 
> 
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Roban H. K. <ro...@as...> - 2009年05月05日 17:29:03
On Tue, May 5, 2009 at 1:04 PM, Ryan May <rm...@gm...> wrote:
> On Tue, May 5, 2009 at 11:47 AM, Jose Gomez-Dans <jgo...@gm...>
> wrote:
>>
>> Hi,
>> I would like to plot a density slice scatter plot (when you have lots of
>> points superimposed, it's very useful). An example from IDL/envi is here:
>> <http://www2.geog.ucl.ac.uk/%7Eplewis/geog2021/practical1/scatter3.gif>
>>
>> My rustic approach to solving this problem has been to bin all my data
>> points into a 2D array (each point that falls in a given cell adds one to
>> that cell), and then use the c argument in scatterplot to map the color to
>> the number of samples in the corresponding bin. Is there a better way of
>> achieving this, as I need a fair bit of tweaking to get the color scales
>> right?
>
> You might try looking at pyplot.hexbin:
>
> http://matplotlib.sourceforge.net/examples/pylab_examples/hexbin_demo.html
>
> Ryan
I've also had some luck with scipy.histogramdd and pylab.imshow (you
have to work with the extent and aspect parameters to get the plot you
want). I don't have a standalone demo of this, but if you try it and
have trouble let me know and I'll try to make one.
From: Ryan M. <rm...@gm...> - 2009年05月05日 17:04:51
On Tue, May 5, 2009 at 11:47 AM, Jose Gomez-Dans <jgo...@gm...>wrote:
> Hi,
> I would like to plot a density slice scatter plot (when you have lots of
> points superimposed, it's very useful). An example from IDL/envi is here: <
> http://www2.geog.ucl.ac.uk/%7Eplewis/geog2021/practical1/scatter3.gif>
>
> My rustic approach to solving this problem has been to bin all my data
> points into a 2D array (each point that falls in a given cell adds one to
> that cell), and then use the c argument in scatterplot to map the color to
> the number of samples in the corresponding bin. Is there a better way of
> achieving this, as I need a fair bit of tweaking to get the color scales
> right?
You might try looking at pyplot.hexbin:
http://matplotlib.sourceforge.net/examples/pylab_examples/hexbin_demo.html
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Jose Gomez-D. <jgo...@gm...> - 2009年05月05日 16:47:56
Hi,
I would like to plot a density slice scatter plot (when you have lots of
points superimposed, it's very useful). An example from IDL/envi is here: <
http://www2.geog.ucl.ac.uk/%7Eplewis/geog2021/practical1/scatter3.gif>
My rustic approach to solving this problem has been to bin all my data
points into a 2D array (each point that falls in a given cell adds one to
that cell), and then use the c argument in scatterplot to map the color to
the number of samples in the corresponding bin. Is there a better way of
achieving this, as I need a fair bit of tweaking to get the color scales
right?
Thanks!
J
22 messages has been excluded from this view by a project administrator.

Showing results of 523

<< < 1 .. 17 18 19 20 21 > >> (Page 19 of 21)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /