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
(8) |
2
(2) |
3
(11) |
4
(11) |
|
5
(3) |
6
(3) |
7
(8) |
8
(1) |
9
(10) |
10
(16) |
11
(1) |
|
12
(8) |
13
(21) |
14
(13) |
15
(15) |
16
(6) |
17
(12) |
18
(2) |
|
19
(6) |
20
(6) |
21
(5) |
22
(2) |
23
(9) |
24
|
25
|
|
26
(2) |
27
(3) |
28
(2) |
29
(10) |
30
(2) |
31
(4) |
|
|
From: Robert F. <Rob...@no...> - 2010-12-10 23:23:35
|
Newbie here, and trying to wade through this stuff, and it's not coming too quickly. I'm just trying to take svg data I already have and turn it around into png/pdf/jpg files. Surely this is not terribly difficult. Any help appreciated! |
|
From: John S. <jsalvati@u.washington.edu> - 2010-12-10 20:43:28
|
Ah, yes, I should have added that I have a lot of them, so this seems like improper usage. I found the collections.LineCollection class which sounds like what I want. Thank you for the help, John On Fri, Dec 10, 2010 at 12:34 PM, Chloe Lewis <ch...@be...> wrote: > You can plot them all individually; e.g. > > rec = ([1,2,.5], [0.5, 3, 1.1], [5, 7, .2]) > for r in rec: > pylab.plot( r[:2], [r[2]]*2) > > > On Dec 10, 2010, at 12:13 PM, John Salvatier wrote: > > I have a set of records with (start, end, value) values. Basically they >> represent "we had this value between these two times". The end of one record >> is not necessarily the end of another record. >> >> I would like to plot a set of line segments with end points (x=start, y= >> value) and (x=end, y=value), so I will have time on the x axis and value on >> the y axis. >> >> Does anyone have any ideas on how I could do this? I would really like my >> line segments not to be connected, so I don't want to use a line plot or >> xyplot. >> >> Best Regards, >> John Salvatier >> >> ------------------------------------------------------------------------------ >> Oracle to DB2 Conversion Guide: Learn learn about native support for >> PL/SQL, >> new data types, scalar functions, improved concurrency, built-in packages, >> OCI, SQL*Plus, data movement tools, best practices and more. >> http://p.sf.net/sfu/oracle-sfdev2dev_______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > |
|
From: Christopher B. <Chr...@no...> - 2010-12-10 20:38:53
|
On 12/10/10 10:00 AM, Virgil Stokes wrote: > Thanks for this link. I tried to use this code but could not load Numeric; i.e. > import Numeric fails. > Where does one get the necessary modules to execute this code? Numeric is quite outdated now. You can probably find it somewhere, but it won't be compatible with new mpl, scipy, etc. Try replacing the calls to "Numeric" with "numpy". You'll probably need to tweak a few other things, too, but it shouldn't be too much. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Chloe L. <ch...@be...> - 2010-12-10 20:34:26
|
You can plot them all individually; e.g.
rec = ([1,2,.5], [0.5, 3, 1.1], [5, 7, .2])
for r in rec:
pylab.plot( r[:2], [r[2]]*2)
On Dec 10, 2010, at 12:13 PM, John Salvatier wrote:
> I have a set of records with (start, end, value) values. Basically
> they represent "we had this value between these two times". The end
> of one record is not necessarily the end of another record.
>
> I would like to plot a set of line segments with end points
> (x=start, y= value) and (x=end, y=value), so I will have time on
> the x axis and value on the y axis.
>
> Does anyone have any ideas on how I could do this? I would really
> like my line segments not to be connected, so I don't want to use a
> line plot or xyplot.
>
> Best Regards,
> John Salvatier
> ------------------------------------------------------------------------------
> Oracle to DB2 Conversion Guide: Learn learn about native support for
> PL/SQL,
> new data types, scalar functions, improved concurrency, built-in
> packages,
> OCI, SQL*Plus, data movement tools, best practices and more.
> http://p.sf.net/sfu/oracle-sfdev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: John S. <jsalvati@u.washington.edu> - 2010-12-10 20:13:34
|
I have a set of records with (start, end, value) values. Basically they represent "we had this value between these two times". The end of one record is not necessarily the end of another record. I would like to plot a set of line segments with end points (x=start, y= value) and (x=end, y=value), so I will have time on the x axis and value on the y axis. Does anyone have any ideas on how I could do this? I would really like my line segments not to be connected, so I don't want to use a line plot or xyplot. Best Regards, John Salvatier |
|
From: Virgil S. <vs...@it...> - 2010-12-10 18:26:44
|
On 10-Dec-2010 08:01, Nicolas wrote: > Hi > > Jean-Marie Epitalon (from IPSL) developped several scripts devoted to > model inter-comparison, included Taylor Diagram, which you can find > here (http://www.ipsl.jussieu.fr/~jmesce/Taylor_diagram/Miscelaneous/plot_taylor_diagrams.py) > > see also here (http://www.ipsl.jussieu.fr/~jmesce/Taylor_diagram/index.html) > and follow the complete description of the program code > > hope that helps > > Nicolas > >> Message: 6 >> Date: Thu, 9 Dec 2010 14:42:41 -0800 (PST) >> From: mdekauwe<mde...@gm...> >> Subject: [Matplotlib-users] Taylor diagram >> To: mat...@li... >> Message-ID:<304...@ta...> >> Content-Type: text/plain; charset=us-ascii >> >> >> Hi, >> >> Has anyone ever managed to draw a taylor diagram in Matplotlib? For example >> like this >> >> http://www.mathworks.com/matlabcentral/fx_files/20559/2/taylordiag_fig.jpg >> >> Cheers, >> >> Martin >> -- >> View this message in context: http://old.nabble.com/Taylor-diagram-tp30421393p30421393.html >> Sent from the matplotlib - users mailing list archive at Nabble.com. Thanks for this link. I tried to use this code but could not load Numeric; i.e. import Numeric fails. Where does one get the necessary modules to execute this code? --V >> ___ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> End of Matplotlib-users Digest, Vol 55, Issue 12 >> ************************************************ >> > > |
|
From: Benjamin R. <ben...@ou...> - 2010-12-10 17:13:52
|
On Fri, Dec 10, 2010 at 11:00 AM, Ian Harry <ian...@as...>wrote:
> Hi Ben,
>
> Thanks for the suggestion, unfortunately I get:
>
> Traceback (most recent call last):
> File "spin_bank.py", line 43, in ?
>
> newBlues = mcolors.LinearSegmentedColormap.from_list("newBlues",
> cm.Blues._lut[cm.Blues.N/3:-3, :-1], 256)
> AttributeError: class LinearSegmentedColormap has no attribute 'from_list'
>
> Am I missing something?
>
> Thanks
>
> Ian
>
>
>
> On 10 December 2010 15:50, Benjamin Root <ben...@ou...> wrote:
>
>> On Thu, Dec 9, 2010 at 9:01 AM, Ian Harry <ian...@as...>wrote:
>>
>>> Hi all,
>>>
>>> I am having a problem with manipulating colorbars. I want to take the
>>> cm.Blues colorbar and edit it so that the lowest end of the colorbar is
>>> light blue instead of white, or in other words I want to remove the lightest
>>> 1/4 of the colorbar and just keep the darker end.
>>>
>>> Is there any easy way to do this?
>>>
>>> Any help would be greatly appreciated!
>>>
>>> Thanks
>>>
>>> Ian Harry
>>>
>>>
>> Ian,
>>
>> First, as a point of semantics, you are talking about colormaps, not
>> colorbars.
>>
>> I have attempted at one point a framework to allow users to manipulate
>> colormaps, but it is very difficult to make it work in a generalized
>> framework. However, it is "relatively" easier to specifically hack a
>> particular colormap to get the results you need.
>>
>> import matplotlib.cm as cm
>> import matplotlib.colors as mcolors
>>
>> cm.Blues._init() # forces it to internally create the '_lut'
>> array
>> newBlues = mcolors.LinearSegmentedColormap.from_list("newBlues",
>> cm.Blues._lut[cm.Blues.N/3:-3, :-1], 256)
>>
>> This should create a new colormap by reinterpolating the last 2/3rds of
>> the Blues colordata to a new 256 colors colormap.
>>
>> I hope this helps!
>>
>> Ben Root
>>
>>
>
>
What version of matplotlib are you using?
Ben Root
|
|
From: Ian H. <ian...@as...> - 2010-12-10 17:00:20
|
Hi Ben,
Thanks for the suggestion, unfortunately I get:
Traceback (most recent call last):
File "spin_bank.py", line 43, in ?
newBlues = mcolors.LinearSegmentedColormap.from_list("newBlues",
cm.Blues._lut[cm.Blues.N/3:-3, :-1], 256)
AttributeError: class LinearSegmentedColormap has no attribute 'from_list'
Am I missing something?
Thanks
Ian
On 10 December 2010 15:50, Benjamin Root <ben...@ou...> wrote:
> On Thu, Dec 9, 2010 at 9:01 AM, Ian Harry <ian...@as...>wrote:
>
>> Hi all,
>>
>> I am having a problem with manipulating colorbars. I want to take the
>> cm.Blues colorbar and edit it so that the lowest end of the colorbar is
>> light blue instead of white, or in other words I want to remove the lightest
>> 1/4 of the colorbar and just keep the darker end.
>>
>> Is there any easy way to do this?
>>
>> Any help would be greatly appreciated!
>>
>> Thanks
>>
>> Ian Harry
>>
>>
> Ian,
>
> First, as a point of semantics, you are talking about colormaps, not
> colorbars.
>
> I have attempted at one point a framework to allow users to manipulate
> colormaps, but it is very difficult to make it work in a generalized
> framework. However, it is "relatively" easier to specifically hack a
> particular colormap to get the results you need.
>
> import matplotlib.cm as cm
> import matplotlib.colors as mcolors
>
> cm.Blues._init() # forces it to internally create the '_lut'
> array
> newBlues = mcolors.LinearSegmentedColormap.from_list("newBlues",
> cm.Blues._lut[cm.Blues.N/3:-3, :-1], 256)
>
> This should create a new colormap by reinterpolating the last 2/3rds of the
> Blues colordata to a new 256 colors colormap.
>
> I hope this helps!
>
> Ben Root
>
>
--
---------------------------------------------------------------------------
Ian Harry
School of Physics & Astronomy
Queens Buildings, The Parade
Cardiff, CF24 3AA
Email: Ian...@as...
Phone: (+44) 29 208 75120
Mobile: (+44) 7890 479090
---------------------------------------------------------------------------
|
|
From: Benjamin R. <ben...@ou...> - 2010-12-10 15:57:47
|
On Thu, Dec 9, 2010 at 9:01 AM, Ian Harry <ian...@as...> wrote:
> Hi all,
>
> I am having a problem with manipulating colorbars. I want to take the
> cm.Blues colorbar and edit it so that the lowest end of the colorbar is
> light blue instead of white, or in other words I want to remove the lightest
> 1/4 of the colorbar and just keep the darker end.
>
> Is there any easy way to do this?
>
> Any help would be greatly appreciated!
>
> Thanks
>
> Ian Harry
>
>
Ian,
First, as a point of semantics, you are talking about colormaps, not
colorbars.
I have attempted at one point a framework to allow users to manipulate
colormaps, but it is very difficult to make it work in a generalized
framework. However, it is "relatively" easier to specifically hack a
particular colormap to get the results you need.
import matplotlib.cm as cm
import matplotlib.colors as mcolors
cm.Blues._init() # forces it to internally create the '_lut' array
newBlues = mcolors.LinearSegmentedColormap.from_list("newBlues",
cm.Blues._lut[cm.Blues.N/3:-3, :-1], 256)
This should create a new colormap by reinterpolating the last 2/3rds of the
Blues colordata to a new 256 colors colormap.
I hope this helps!
Ben Root
|
|
From: Benjamin R. <ben...@ou...> - 2010-12-10 15:25:35
|
On Wed, Dec 8, 2010 at 9:15 PM, Timothy W. Hilton <hi...@me...>wrote:
> Hello,
>
> I'm trying to teach myself to create custom colormaps to highlight
> certain aspects of a dataset I am working with. The script below
> produces two plots -- the first shows a 4x4 array foo of random floats
> between 0.0 and 1.0, and the second shows the same array, but normalized
> such that [foo.min(), foo.max()] is mapped to [0.0, 1.0].
>
> As I understand it, I am plotting two slightly different datasets using
> the same colormap, yet the two colorbars are different -- note the
> value at the transition from grayscale to red.
>
> I am not sure whether the colors are being assigned to slightly
> different data values in the two plots, or if the problem is in plotting
> the colorbar. I'd appreciate any help!
>
> Thanks,
> Tim
>
>
Hello Tim,
Nice to see more students at PSU meteo jumping in on matplotlib (I am a
graduate from there).
When you call pcolor() without specifying the vmin and the vmax values,
pcolor() will automatically normalize your input data to the range of 0.0 to
1.0 for the purposes of coloring, but the ticks on the colorbar will be
based on the original input values. When you normalized the data yourself,
the colorbar for that plot will use the given input values for deciding the
tick values, since it could not know what the original data had.
Note that both pcolors are producing identically colored plots, it is just
the colorbar that shows a different color<->value relationship. Now, to
illustrate this point further, let's pick a colormap that changes rapidly,
such as 'flag'. Change the line:
mycm1 = mpl.colors.LinearSegmentedColormap('mycm1', mycmdata1)
to
mycm1 = 'flag'
And then run the script. You will see the plots are still identical. Now,
change the first pcolor call from
plt.pcolor(foo, cmap=mycm1)
to
plt.pcolor(foo, cmap=mycm1, vmin=0.0, vmax=1.0)
and run the script. The plots are different! But the colorbars are the
same! This is because the data going into the two pcolors calls are
different and so all of this behavior is as expected.
I hope this clears things up for you, and I hope you continue to enjoy using
matplotlib!
Ben Root
P.S. - Tell Dr. Young I said "Hi!"
|
|
From: Ryan M. <rm...@gm...> - 2010-12-10 14:26:37
|
On Thu, Dec 9, 2010 at 5:00 PM, Russell E. Owen <ro...@uw...> wrote: > I explored the memory leak in my strip chart widget some more and found > that it is caused by calling canvas.draw(), where canvas is: > > figure = matplotlib.figure.Figure(figsize=(8, 2), frameon=True) > canvas = FigureCanvasTkAgg(figure, self) > > canvas.show() exhibits exactly the same problem. > > So...what is the right way to redraw a plot after its X axes have been > changed? draw() *is* the right way. It should definitely not be leaking. Hopefully someone familiar with those kinds of problems can take a look. (I just don't have the time right now.) Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Nicolas <nic...@gm...> - 2010-12-10 07:01:11
|
Hi Jean-Marie Epitalon (from IPSL) developped several scripts devoted to model inter-comparison, included Taylor Diagram, which you can find here (http://www.ipsl.jussieu.fr/~jmesce/Taylor_diagram/Miscelaneous/plot_taylor_diagrams.py) see also here (http://www.ipsl.jussieu.fr/~jmesce/Taylor_diagram/index.html) and follow the complete description of the program code hope that helps Nicolas > Message: 6 > Date: Thu, 9 Dec 2010 14:42:41 -0800 (PST) > From: mdekauwe <mde...@gm...> > Subject: [Matplotlib-users] Taylor diagram > To: mat...@li... > Message-ID: <304...@ta...> > Content-Type: text/plain; charset=us-ascii > > > Hi, > > Has anyone ever managed to draw a taylor diagram in Matplotlib? For example > like this > > http://www.mathworks.com/matlabcentral/fx_files/20559/2/taylordiag_fig.jpg > > Cheers, > > Martin > -- > View this message in context: http://old.nabble.com/Taylor-diagram-tp30421393p30421393.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > >___ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > End of Matplotlib-users Digest, Vol 55, Issue 12 > ************************************************ > -- _/\/¯¯¯¯¯¯\/\_ 33º49'45.24"S & 18º28'45.60"E Dr. Nicolas Fauchereau CSIR - NRE Research Group: Ocean systems and climate 15 Lower Hope street, Rosebank 7700 South Africa tel: 021 658 2764 _/\/¯¯¯¯¯¯\/\_ 33º49'45.24"S & 18º28'45.60"E |
|
From: Jae-Joon L. <lee...@gm...> - 2010-12-10 05:33:48
|
>
> When I was using matplotlib 0.98.5.2, I had the same code as I have now,
> with two different axes, and pick events were picked up on lines belonging
> to either of the axes. Unless I'm misunderstanding, something has changed
> and this used to be possible. Is that correct?
Yes, I believe this used to be possible. While I'm not sure why it
changed, I'm also not sure if we need to revert this change as I
personally prefer the current simple behavior (although there could be
a room for improvement). And I want to hear what others think. You may
file a new feature request (or a bug if you want) issue regarding
this.
>
>> For the example above, a workaround is to move the line to the axes of
>> higher zorder.
>>
>> line.remove()
>> ax2.add_line(line)
>
> Thanks. That works for that example, but in my actual program I want to
> highlight the picked points with a star. if I reparent the one line to the
> other axis, the stars will be plotted on the wrong axis, way off the
> intended marker. This can be seen in the modification of the above code,
> posted below (click on the middle red marker, then the middle blue one). Is
> there a further workaround? (Code at bottom).
>
It will work if you explicitly set its transform.
star, = ax.plot([xdata[ind]], [ydata[ind]], '*',
ms=40, mfc='y', mec='b',
transform=thisline.get_transform())
> I also use the identity of the picked line in my code, since I provide
> additional information about that data series to the user based on which
> line (and point) they picked. So if reparenting the line loses that
> information, that's going to be a problem.
>
I believe that reparenting only changes the "axes" attribute of the
line, so it might not be a problem.
Given the current implementation of the pick event handler, I think it
might be better for you to implement a custom handler although this
may takes you more time.
However, I must admit that I rarely use events with matplotlib. I'm
only addressing this since there were no response from other
developers. And they may have different opinions than me.
Regards,
-JJ
> thanks,
> -Che
>
> ---
> import matplotlib.pyplot as plt
>
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax2 = ax.twinx()
>
> line, = ax.plot([1,2,5], 'r-o', markersize=15, picker=5)
> line2, = ax2.plot([4,5,12], 'b-o', markersize=15, picker=5)
>
> line.remove()
> ax2.add_line(line)
>
> def onpick(event):
> thisline = event.artist
> print 'picked line: ', event.artist
> ind = event.ind
> xdata = thisline.get_xdata()
> ydata = thisline.get_ydata()
>
> star, = ax.plot([xdata[ind]], [ydata[ind]], '*', ms=40, mfc='y',
> mec='b')
> fig.canvas.draw()
>
> fig.canvas.mpl_connect('pick_event', onpick)
>
> plt.show()
>
>
|
|
From: Arthur M. G. <am...@ir...> - 2010-12-10 03:28:41
|
On 12/09/2010 05:42 PM, mdekauwe wrote: > > Hi, > > Has anyone ever managed to draw a taylor diagram in Matplotlib? For example > like this > > http://www.mathworks.com/matlabcentral/fx_files/20559/2/taylordiag_fig.jpg > > Cheers, > > Martin Not sure whether Matplotlib can do this, but it can be done with CDAT, another Python-based library: http://www2-pcmdi.llnl.gov/cdat HTH, AMG ----------------- |
|
From: C M <cmp...@gm...> - 2010-12-10 02:44:54
|
On Thu, Dec 9, 2010 at 8:45 PM, Jae-Joon Lee <lee...@gm...> wrote:
> As far as I understand, all the events in matplotlib are associated
> with a single Axes instance (or None). For overlapping multiple axes,
> the axes with highest zorder is picked up. And a "pick
> event only works for artists in the associated axes.
>
When I was using matplotlib 0.98.5.2, I had the same code as I have now,
with two different axes, and pick events were picked up on lines belonging
to either of the axes. Unless I'm misunderstanding, something has changed
and this used to be possible. Is that correct?
For the example above, a workaround is to move the line to the axes of
> higher zorder.
>
> line.remove()
> ax2.add_line(line)
>
Thanks. That works for that example, but in my actual program I want to
highlight the picked points with a star. if I reparent the one line to the
other axis, the stars will be plotted on the wrong axis, way off the
intended marker. This can be seen in the modification of the above code,
posted below (click on the middle red marker, then the middle blue one). Is
there a further workaround? (Code at bottom).
I also use the identity of the picked line in my code, since I provide
additional information about that data series to the user based on which
line (and point) they picked. So if reparenting the line loses that
information, that's going to be a problem.
thanks,
-Che
---
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
ax2 = ax.twinx()
line, = ax.plot([1,2,5], 'r-o', markersize=15, picker=5)
line2, = ax2.plot([4,5,12], 'b-o', markersize=15, picker=5)
line.remove()
ax2.add_line(line)
def onpick(event):
thisline = event.artist
print 'picked line: ', event.artist
ind = event.ind
xdata = thisline.get_xdata()
ydata = thisline.get_ydata()
star, = ax.plot([xdata[ind]], [ydata[ind]], '*', ms=40, mfc='y',
mec='b')
fig.canvas.draw()
fig.canvas.mpl_connect('pick_event', onpick)
plt.show()
|
|
From: Jae-Joon L. <lee...@gm...> - 2010-12-10 01:46:21
|
As far as I understand, all the events in matplotlib are associated with a single Axes instance (or None). For overlapping multiple axes, the axes with highest zorder is picked up. And a "pick event only works for artists in the associated axes. While this simple approach is okay at least to me, I want to hear from other developers. For the example above, a workaround is to move the line to the axes of higher zorder. line.remove() ax2.add_line(line) Regards, -JJ On Fri, Dec 10, 2010 at 5:01 AM, Goyo <goy...@gm...> wrote: > 2010/12/9 C M <cmp...@gm...>: >> >>> I have created a runnable sample app that demonstrates the problem >> >> Here is a much simpler 10 line sample that doesn't require wxPython and >> demonstrates the problem: you can't pick the red line. This seems like a >> bug in mpl 1.0. > > Confirmed using tkagg, mpl 1.0.0 and Ubuntu 10.10. I do not know much > about the semantics of the pick event but it I don't think it should > discriminate between lines in the same canvas si I guess it's a bug. > > Goyo > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |