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
|
2
(13) |
3
(5) |
4
(5) |
5
(21) |
6
(10) |
7
(9) |
|
8
(4) |
9
(11) |
10
(9) |
11
(11) |
12
(25) |
13
(5) |
14
(2) |
|
15
(5) |
16
(8) |
17
(16) |
18
(11) |
19
(15) |
20
(5) |
21
(8) |
|
22
(4) |
23
(24) |
24
(9) |
25
(14) |
26
(5) |
27
(28) |
28
(2) |
|
29
(13) |
30
(14) |
31
(11) |
|
|
|
|
|
From: Benjamin R. <ben...@ou...> - 2012-01-27 16:17:18
|
On Fri, Jan 27, 2012 at 10:11 AM, Fabien Lafont <laf...@gm...>wrote: > Yes in fact it plot it well, but then I have a vector like: > [3702.1399999999999, nan, nan, nan, 3703.79, nan, nan, nan, > 3704.6900000000001, 3704.8400000000001] > and it's impossible to fit it. It return 'nan'. > > Ive tried: > > for i in range(0,NbPts): > if column1[i] == nan: > column1[i].remove(nan) > column2[i].remove(nan) > > to remove these points but it doesn't work > > You can't do equality tests with NaNs (us np.isnan(), instead). This question is more suited for the Numpy list. Ben Root |
|
From: Jérôme <je...@jo...> - 2012-01-27 16:17:12
|
Fri, 27 Jan 2012 16:48:25 +0100 Fabien Lafont a écrit: > I want to plot something like: > > > X(time) Ypoints > 0 8 > 1 > 2 7 > 3 > 4 > 5 > 6 > 7 > 8 > 9 Sorry if I'm missing something, but can't you plot Y [8,7] against X [0,2] ? -- Jérôme |
|
From: nahren m. <mee...@ya...> - 2012-01-27 16:13:06
|
Dear Users, I want to plot a XY, the X-value is constant, but let assume Y varees from 1-10, so I want o have different colors accordingly for the range 0-2,2-4,4-6,6-8,8-10. thanks a lot najren |
|
From: Fabien L. <laf...@gm...> - 2012-01-27 16:11:20
|
Yes in fact it plot it well, but then I have a vector like:
[3702.1399999999999, nan, nan, nan, 3703.79, nan, nan, nan,
3704.6900000000001, 3704.8400000000001]
and it's impossible to fit it. It return 'nan'.
Ive tried:
for i in range(0,NbPts):
if column1[i] == nan:
column1[i].remove(nan)
column2[i].remove(nan)
to remove these points but it doesn't work
2012/1/27 Benjamin Root <ben...@ou...>:
> On Fri, Jan 27, 2012 at 9:52 AM, Fabien Lafont <laf...@gm...>
> wrote:
>>
>> Sorry, It's an awkward manipulation. I finish the mail
>>
>> 2012/1/27 Fabien Lafont <laf...@gm...>:
>> > I want to plot something like:
>> >
>> >
>> > X(time) Ypoints
>> > 0 8
>> > 1
>> > 2 7
>> > 3 6
>> > 4 4
>> > 5
>> > 6
>> > 7 7
>> > 8 2
>> > 9 10
>>
>> In fact I've recorded some live datas and when I use genfromtxt() the
>> blank parts are "translated" as 'nan' and I can't for example fit it
>> with polynomials.
>>
>
> If you plot the data, it should skip data points that are NaNs and you
> should see a break in the line IIRC. Is that not what you want?
>
> Ben Root
>
|
|
From: Howard <ho...@re...> - 2012-01-27 16:06:30
|
On 1/27/12 3:39 AM, Ian Thomas wrote: > On 26 January 2012 19:36, Howard <ho...@re... > <mailto:ho...@re...>> wrote: > > I'm rendering some images with about 3.5 million triangles into a > 512x512 png file using tricontourf. I'm running this in a virtual > machine, and I'm pretty sure that there is no graphics rendering > hardware being used. Is it possible, assuming the hardware was > available, to make tricontourf use the rendering hardware? Will > that happen by default? > > > You are correct, there is no graphics hardware rendering. Rendering > is controlled by the various matplotlib backends, and to my knowledge > there are no backends currently available that use hardware rendering. > > There has been some work done on an OpenGL backend, but I am not sure > of the status of this. The last time I checked it was pretty > experimental. Perhaps someone involved with it can comment on its > current status. > > Ian Thomas Ian Thanks very much for the reply. If it helps whoever is doing the OpenGL backend, I may be able to play with it a bit. Howard -- Howard Lander <mailto:ho...@re...> Senior Research Software Developer Renaissance Computing Institute (RENCI) <http://www.renci.org> The University of North Carolina at Chapel Hill Duke University North Carolina State University 100 Europa Drive Suite 540 Chapel Hill, NC 27517 919-445-9651 |
|
From: Benjamin R. <ben...@ou...> - 2012-01-27 16:03:52
|
On Fri, Jan 27, 2012 at 9:52 AM, Fabien Lafont <laf...@gm...>wrote: > Sorry, It's an awkward manipulation. I finish the mail > > 2012/1/27 Fabien Lafont <laf...@gm...>: > > I want to plot something like: > > > > > > X(time) Ypoints > > 0 8 > > 1 > > 2 7 > > 3 6 > > 4 4 > > 5 > > 6 > > 7 7 > > 8 2 > > 9 10 > > In fact I've recorded some live datas and when I use genfromtxt() the > blank parts are "translated" as 'nan' and I can't for example fit it > with polynomials. > > If you plot the data, it should skip data points that are NaNs and you should see a break in the line IIRC. Is that not what you want? Ben Root |
|
From: Fabien L. <laf...@gm...> - 2012-01-27 15:52:45
|
Sorry, It's an awkward manipulation. I finish the mail 2012/1/27 Fabien Lafont <laf...@gm...>: > I want to plot something like: > > > X(time) Ypoints > 0 8 > 1 > 2 7 > 3 6 > 4 4 > 5 > 6 > 7 7 > 8 2 > 9 10 In fact I've recorded some live datas and when I use genfromtxt() the blank parts are "translated" as 'nan' and I can't for example fit it with polynomials. |
|
From: Fabien L. <laf...@gm...> - 2012-01-27 15:48:34
|
I want to plot something like: X(time) Ypoints 0 8 1 2 7 3 4 5 6 7 8 9 |
|
From: Benjamin R. <ben...@ou...> - 2012-01-27 15:00:14
|
On Friday, January 27, 2012, Eric Emsellem <eem...@es...> wrote: > Dear all, > > I have a set of Voronoi bins, defined by nodes (x,y) and an underlying > mesh of squared bins. > See an example here of such Voronoi bins. > > http://www.google.fr/imgres?q=voronoi+binning&hl=fr&sa=X&biw=1280&bih=665&tbm=isch&prmd=imvnsb&tbnid=zp0RRIktKlF9pM:&imgrefurl=http://www.aanda.org/articles/aa/full/2007/09/aa4621-05/aa4621-05.right.html&docid=CeAk6FN_pZDa5M&imgurl=http://www.aanda.org/articles/aa/full/2007/09/aa4621-05/img26.gif&w=532&h=1087&ei=ZmYiT-Z7xYDyA9ew0acM&zoom=1&iact=rc&dur=164&sig=112304340793152029504&page=4&tbnh=151&tbnw=74&start=63&ndsp=25&ved=1t:429,r:1,s:63&tx=58&ty=65 > > So basically each node, (x,y) would define a Voronoi bin made of a set > of squared pixels. So one node would correspond to for example N squared > pixels: > > node[i] = [(x1,y1),(x2,y2),...(xN,yN)] > > I want now to create an imshow like plot of these bins by using the four > colour theorem, meaning that I would use 4 colours and want adjacent > Voronoi bins not to have the same colour. > > Is there a simple way to do this in matplotlib? I couldn't find much on > the web so far. > > thanks! > Eric > None that I am aware of, but if one existed, it would likely be found within the basemap module. If it isn't in the Basemap module, it would be an awesome feature to add. Maybe something that would work with my style-cycling mechanism that I have been tinkering with to allow for users to specify 4 different hatchings for b&w publications? Cheers! Ben Root |
|
From: Tony Yu <ts...@gm...> - 2012-01-27 14:30:02
|
On Fri, Jan 27, 2012 at 9:13 AM, Pål Gunnar Ellingsen <pa...@gm...>wrote:
> Hi
>
> I have a array, M, which is (4Nx4M), and an array (image), im, which is
> NxM.
> I can currently plot the matrix as a 2d image using imshow using:
>
> import matplotlib.pyplot as plt
> from matplotlib import cm
>
> # some code for reading in the matrix
>
> cmap = cm.get_cmap('jet', 256)
> imM = plt.imshow(M, cmap=cmap, vmin= -1, vmax=1)
>
> But now i would like to plot im on top of M, such that it covers the firs
> element of M.
> If I do
>
> plt.hold()
> plt.imshow(im)
>
> I only see im, and not M. I'm used to doing this in Matlab, where this
> would work.
>
> Can anyone explain me what I'm doing wrong?
>
>
> Kind Regards
>
A call to `plt.autoscale` should fix your problem. It looks like `imshow`
rescales the axes limits to the current image limits, instead of the limits
for all the data in the axes. (Executable example below; note, axes "hold"
by default, so it's not necessary to call hold).
-Tony
import numpy as np
import matplotlib.pyplot as plt
background = np.random.uniform(0, 255, size=(20, 20))
overlay = np.arange(25).reshape((5, 5))
plt.imshow(background, interpolation='nearest', cmap=plt.cm.gray)
plt.imshow(overlay, cmap=plt.cm.jet, alpha=0.5)
# You could also replace this with `plt.axis([0, 20, 0, 20])
plt.autoscale()
plt.show()
|
|
From: Pål G. E. <pa...@gm...> - 2012-01-27 14:13:46
|
Hi
I have a array, M, which is (4Nx4M), and an array (image), im, which is NxM.
I can currently plot the matrix as a 2d image using imshow using:
import matplotlib.pyplot as plt
from matplotlib import cm
# some code for reading in the matrix
cmap = cm.get_cmap('jet', 256)
imM = plt.imshow(M, cmap=cmap, vmin= -1, vmax=1)
But now i would like to plot im on top of M, such that it covers the firs
element of M.
If I do
plt.hold()
plt.imshow(im)
I only see im, and not M. I'm used to doing this in Matlab, where this
would work.
Can anyone explain me what I'm doing wrong?
Kind Regards
|
|
From: Jerzy K. <jer...@un...> - 2012-01-27 10:54:43
|
Benjamin Root answers my query concerning user-generated events : > To answer your question, take a look at how pick_event() is declared > in backend_bases.py: > > def pick_event(self, mouseevent, artist, **kwargs): > ... > self.callbacks.process(s, event) > > The function that "fires" the event is "self.callbacks.process(s, > event)", where "self" is the figure canvas. Dear Ben, thank you, but this is not exactly my problem. I don't want to call the callback myself, since the event should be "fired" from within a callback. I should have been more precise. Let's distil the problem. [This is a part of my current teaching...] I did already what you suggest here... Imagine an animation, which consists in generating a trajectory, segment after segment (say, of a planet). Classically this is a loop, but when it runs, the rest of the program is blocked. So, instead, the code behaves as a Python generator, generates just one segment, and that's all. But it "yields" something, it posts an event, put it in a queue, and somebody else, the mainloop() or similar, pops it off the queue and re-launches the callback. (With generators, it calls the .next()). No timers, as in Timer or Funct animations... It must be "decentralized", no recursive calls. My callback from time to time creates another planet, or destroys an existent, and there are simultaneous trajectories on the screen, several concurrent events in the queue. And the system should remain reactive, interpret buttons, sliders, etc. I know how to do this by hand, how to write my own event loop, declare a queue, and how to add to my private "virtual" event handling also the callbacks of mouse events. But this is an overkill, I repeat the functionalities which are already there, the event queue in particular. I did it with wx. But Matplotlib protects the user from the concrete back-end, and I want to protect my students as well, so I look for a "GUI-neutral" solution. Thanks. Jerzy |
|
From: Eric E. <eem...@es...> - 2012-01-27 09:27:16
|
Dear all, I have a set of Voronoi bins, defined by nodes (x,y) and an underlying mesh of squared bins. See an example here of such Voronoi bins. http://www.google.fr/imgres?q=voronoi+binning&hl=fr&sa=X&biw=1280&bih=665&tbm=isch&prmd=imvnsb&tbnid=zp0RRIktKlF9pM:&imgrefurl=http://www.aanda.org/articles/aa/full/2007/09/aa4621-05/aa4621-05.right.html&docid=CeAk6FN_pZDa5M&imgurl=http://www.aanda.org/articles/aa/full/2007/09/aa4621-05/img26.gif&w=532&h=1087&ei=ZmYiT-Z7xYDyA9ew0acM&zoom=1&iact=rc&dur=164&sig=112304340793152029504&page=4&tbnh=151&tbnw=74&start=63&ndsp=25&ved=1t:429,r:1,s:63&tx=58&ty=65 So basically each node, (x,y) would define a Voronoi bin made of a set of squared pixels. So one node would correspond to for example N squared pixels: node[i] = [(x1,y1),(x2,y2),...(xN,yN)] I want now to create an imshow like plot of these bins by using the four colour theorem, meaning that I would use 4 colours and want adjacent Voronoi bins not to have the same colour. Is there a simple way to do this in matplotlib? I couldn't find much on the web so far. thanks! Eric |
|
From: Ian T. <ian...@gm...> - 2012-01-27 08:39:47
|
On 26 January 2012 19:36, Howard <ho...@re...> wrote: > I'm rendering some images with about 3.5 million triangles into a 512x512 > png file using tricontourf. I'm running this in a virtual machine, and I'm > pretty sure that there is no graphics rendering hardware being used. Is it > possible, assuming the hardware was available, to make tricontourf use the > rendering hardware? Will that happen by default? > You are correct, there is no graphics hardware rendering. Rendering is controlled by the various matplotlib backends, and to my knowledge there are no backends currently available that use hardware rendering. There has been some work done on an OpenGL backend, but I am not sure of the status of this. The last time I checked it was pretty experimental. Perhaps someone involved with it can comment on its current status. Ian Thomas |
|
From: Paul I. <piv...@gm...> - 2012-01-27 02:44:03
|
Hi Shankar, Shankararaman Ramakrishnan, on 2012-01-26 18:24, wrote: > I have been trying to leverage plot_date() to generate time trends. I > seem to run into the following runtime error and don't have much > insight as to why this is happening. Specifically, I don't quite see why > the function is attempting to set the lower bound to 0001-01-01 UTC when > my x-axis starts only from day number 729390. I suspect this may be the case because you've already plotted something on this axis that resolves to this early date. For example, I can reproduce an error similar to yours by first doing plot(1,0) before the plot_date call. Can you try to create a new figure just before the call to plot_date? best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 |
|
From: Shankararaman R. <Sha...@Tr...> - 2012-01-27 02:24:50
|
Hi,
I have been trying to leverage plot_date() to generate time trends. I
seem to run into the following runtime error and don't have much
insight as to why this is happening. Specifically, I don't quite see why
the function is attempting to set the lower bound to 0001-01-01 UTC when
my x-axis starts only from day number 729390.
I am using Python 2.4 and Matplotlib 1.0.1
In [131]: date_num = date2num(dates)
In [132]: date_num
Out[132]:
array([ 729390., 729391., 729392., 729393., 729394., 729395.,
729396., 729397., 729398., 729399.])
In [133]: plot_date(date_num,range(10))
RuntimeError: RRuleLocator estimated to generate 2012 ticks from
0001-01-01 00:00:00+00:00 to 2012-02-04 17:46:21.028099+00:00: exceeds
Locator.MAXTICKS * 2 (2000)
Any help will be much appreciated.
Thanks,
Shankar
|
|
From: fabio.lima <fab...@uf...> - 2012-01-27 01:34:07
|
Dear users Matplotlib
I am new to Matplotlib and would like to know
how the code below I can set the command to plot the spline instead of
straight lines.
# -- Plot the reaction path
import pylab as p
fig =
p.figure(1)
sp = p.subplot(1,1,1)
p.plot(range(len(Epath)), Epath,
's-')
for idx, (E,label) in enumerate(zip(Epath,PathLabels)):
p.text(idx, E, label,
horizontalalignment='center',
verticalalignment='top')
p.title('H2O disassociation')
p.ylabel('Energy
[eV]')
p.xlabel('Reaction path')
p.xlim([-0.5, 2.5])
p.ylim([-0.5,
1.5])
sp.get_xaxis().set_ticks([]) # Turn off ticks on
xaxis
p.show()
Best Regards
Fábio de Lima
Chemistry Department -
UFMS- Campo Grande Brazil
Phone: 55 (67) 3345-3596
Cellular: 55 (67)
9639-1338
|
|
From: Benjamin R. <ben...@ou...> - 2012-01-26 21:39:59
|
On Thu, Jan 26, 2012 at 3:24 PM, Jerzy Karczmarczuk <
jer...@un...> wrote:
> Does anybody know how to generate and process my "private" events? I can
> subclass the Event() class, say, MyEvent,
> with a name "my_event", and I can -
> canvas.mpl_connect('my_event', aCallback)
>
> but then, how to fire one? (I don't want to call the callback directly).
>
>
> Suppose that the interface, when show() is active launches a
> simulation/visualisation program which animates many things in its
> figure. From time to time something "special" appears, and its behaviour
> should be steered by those private events.
>
> (Yes, I know that I can do it in several other ways, or write my own
> event-processing loop, or use directly wxPython or PyGTK instead of
> Matplotlib. So, I don't need the replacement solution, but just a way to
> fire events within Matplotlib...)
>
> Thank you.
>
> Jerzy Karczmarczuk
> Caen, France
>
>
It is smart to simply re-use mpl's event callback system. Luckily, in the
latest release, we allowed for arbitary events to be added. To answer your
question, take a look at how pick_event() is declared in backend_bases.py:
def pick_event(self, mouseevent, artist, **kwargs):
"""
This method will be called by artists who are picked and will
fire off :class:`PickEvent` callbacks registered listeners
"""
s = 'pick_event'
event = PickEvent(s, self, mouseevent, artist, **kwargs)
self.callbacks.process(s, event)
The function that "fires" the event is "self.callbacks.process(s, event)",
where "self" is the figure canvas.
I hope this helps!
Ben Root
|
|
From: Jerzy K. <jer...@un...> - 2012-01-26 21:24:14
|
Does anybody know how to generate and process my "private" events? I can
subclass the Event() class, say, MyEvent,
with a name "my_event", and I can -
canvas.mpl_connect('my_event', aCallback)
but then, how to fire one? (I don't want to call the callback directly).
Suppose that the interface, when show() is active launches a
simulation/visualisation program which animates many things in its
figure. From time to time something "special" appears, and its behaviour
should be steered by those private events.
(Yes, I know that I can do it in several other ways, or write my own
event-processing loop, or use directly wxPython or PyGTK instead of
Matplotlib. So, I don't need the replacement solution, but just a way to
fire events within Matplotlib...)
Thank you.
Jerzy Karczmarczuk
Caen, France
|
|
From: Howard <ho...@re...> - 2012-01-26 19:48:48
|
Hi all
I'm rendering some images with about 3.5 million triangles into a
512x512 png file using tricontourf. I'm running this in a virtual
machine, and I'm pretty sure that there is no graphics rendering
hardware being used. Is it possible, assuming the hardware was
available, to make tricontourf use the rendering hardware? Will that
happen by default?
Here's the relevant portion of the code.
figure1 = plt.figure(figsize=(imageWidth,imageHeight))
theTriangulation.set_mask(mask)
plt.axis("off")
# This makes sure the figure fills the canvas
ax = figure1.add_axes([0,0,1,1])
# This turns off the tick marks of the axis we added.
ax.axis("off")
plt.tricontourf(theTriangulation,
modelData,
theLookupTable.N,
norm=theNorm,
antialiased=False,
cmap=theLookupTable)
canvas = FigureCanvasAgg(figure1)
canvas.print_figure(fileName, dpi=DPI)
Thanks
Howard
--
Howard Lander <mailto:ho...@re...>
Senior Research Software Developer
Renaissance Computing Institute (RENCI) <http://www.renci.org>
The University of North Carolina at Chapel Hill
Duke University
North Carolina State University
100 Europa Drive
Suite 540
Chapel Hill, NC 27517
919-445-9651
|
|
From: Tony Yu <ts...@gm...> - 2012-01-26 18:56:12
|
On Thu, Jan 26, 2012 at 8:20 AM, Sabine van der Linden <in...@sb...>wrote:
> Hello,
>
> I have made a plot with a fill_between part, which does not show up in the
> legend. I have read that I have to use a proxy artist for this, but I have
> no
> clue where to place this, and how.. The fill between works fine, it's just
> the
> legend that is not really cooperating ;)
>
> import matplotlib.pyplot as plt
>
> plt.plot(dbx, gemlist)
> plt.title('Reekslengte '+str(i))
> plt.xlabel('signaal-ruisverhouding ingangssignaal (dB)')
> plt.ylabel('signaal-ruisverhouding uitgangssignaal (dB)')
> plt.xlim(-36, 22)
>
> plt.fill_between(dbx, boven, onder, color='b', alpha=0.1)
> plt.legend(loc=4)
> plt.show()
>
> Tnx in advance :)
>
> Sabine
>
>
I have a convenience function (copied below) in my python path that I like
to use for this purpose.
Hope that helps,
-Tony
#~~~~
def fill_between(x, y1, y2=0, ax=None, **kwargs):
"""Plot filled region between `y1` and `y2`.
This function works exactly the same as matplotlib's fill_between,
except
that it also plots a proxy artist (specifically, a rectangle of 0 size)
so that it can be added it appears on a legend.
"""
ax = ax if ax is not None else plt.gca()
ax.fill_between(x, y1, y2, **kwargs)
p = plt.Rectangle((0, 0), 0, 0, **kwargs)
ax.add_patch(p)
return p
|
|
From: Sabine v. d. L. <in...@sb...> - 2012-01-26 18:40:30
|
Hello,
I have made a plot with a fill_between part, which does not show up in the
legend. I have read that I have to use a proxy artist for this, but I have no
clue where to place this, and how.. The fill between works fine, it's just the
legend that is not really cooperating ;)
import matplotlib.pyplot as plt
plt.plot(dbx, gemlist)
plt.title('Reekslengte '+str(i))
plt.xlabel('signaal-ruisverhouding ingangssignaal (dB)')
plt.ylabel('signaal-ruisverhouding uitgangssignaal (dB)')
plt.xlim(-36, 22)
plt.fill_between(dbx, boven, onder, color='b', alpha=0.1)
plt.legend(loc=4)
plt.show()
Tnx in advance :)
Sabine
|
|
From: Josh H. <jh...@sp...> - 2012-01-25 23:02:36
|
Thanks Tony. This is actually a brand new Python installation. I am running on 64-bit Windows 7, with Enthought's EPD 7.2.2 (also 64-bit). I tried testing various code snippets again and found that when I run my code, subsequent gallery examples (that call colorbar()) fail. When I run the gallery examples first they work as expected, but my code still fails in the same place. Hmmm.... ----- Josh Hemann -- View this message in context: http://old.nabble.com/colorbar.py-bug-in-matplotlib-1.1.0--tp33203387p33204535.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Tony Yu <ts...@gm...> - 2012-01-25 21:45:53
|
On Wed, Jan 25, 2012 at 2:42 PM, Josh Hemann <jh...@sp...>wrote: > I have some code that has worked in matplotlib versions 0.99 and 1.0.1. > Recently, I updated to 1.1.0 and my code broke, specifically in a call to > colorbar(). I tried running this gallery example<http://matplotlib.sourceforge.net/examples/pylab_examples/colorbar_tick_labelling_demo.html>and get the same error. Here is the snippet: The > error results from the first call to colorbar in the example, which is cbar > = fig.colorbar(cax, ticks=[-1, 0, 1]) My internet searches have not > revealed anything yet. Has anyone seen or reported this issue? Any clean > work-arounds? > Josh Hemann > > > Hi Josh, Do you get the error with the gallery example, or some modified version of it? The example runs fine on my system (but I'm on a more recent development version). Is there any chance that your installation got screwed up? How did you upgrade? -Tony |
|
From: Josh H. <jh...@sp...> - 2012-01-25 19:42:24
|
I have some code that has worked in matplotlib versions 0.99 and 1.0.1. Recently, I updated to 1.1.0 and my code broke, specifically in a call to colorbar(). I tried running http://matplotlib.sourceforge.net/examples/pylab_examples/colorbar_tick_labelling_demo.html this gallery example and get the same error. Here is the snippet: http://old.nabble.com/file/p33203387/ScreenShot007.png The error results from the first call to colorbar in the example, which is cbar = fig.colorbar(cax, ticks=[-1, 0, 1]) My internet searches have not revealed anything yet. Has anyone seen or reported this issue? Any clean work-arounds? ----- Josh Hemann -- View this message in context: http://old.nabble.com/colorbar.py-bug-in-matplotlib-1.1.0--tp33203387p33203387.html Sent from the matplotlib - users mailing list archive at Nabble.com. |