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
(35) |
2
(15) |
3
(16) |
4
(3) |
5
(1) |
|
6
(1) |
7
(11) |
8
(10) |
9
(13) |
10
(24) |
11
(21) |
12
(10) |
|
13
(2) |
14
(24) |
15
(20) |
16
(36) |
17
(13) |
18
(6) |
19
(4) |
|
20
(2) |
21
(11) |
22
(13) |
23
(7) |
24
(10) |
25
(7) |
26
(12) |
|
27
(2) |
28
(6) |
29
(20) |
30
(9) |
31
(39) |
|
|
|
From: Lionel R. <lro...@li...> - 2008-07-21 16:16:38
|
Hi all, just to know if there's a proper way to convert a basemap generated with contourf to a KML (or polygon shapefile) ? Thanks -- Lionel Roubeyrie - lro...@li... Chargé d'études et de maintenance LIMAIR - la Surveillance de l'Air en Limousin http://www.limair.asso.fr |
|
From: Eli B. <eb...@gm...> - 2008-07-21 12:03:24
|
Hello
I there a way to change the default mathtext font from cal to rm ?
I would like to use the rm (serif) font without stating rm{...} or
mathrm{...}.
Is it possible to do using the matplotlibrc ?
can you give me an example of how this is done ?
Thanks
Eli
|
|
From: John H. <jd...@gm...> - 2008-07-21 10:35:51
|
On Mon, Jul 21, 2008 at 2:57 AM, Matthias Michler <Mat...@gm...> wrote: > Hello Hussein, > > maybe the following example helps you. It uses the module 'time' to wait for > some seconds. A note of caution: this example will probably only work with tkagg. For other GUIs, like gtk, wx, or qt, you will probably want to use a timeout handler. JDH |
|
From: John H. <jd...@gm...> - 2008-07-21 10:09:19
|
On Mon, Jul 21, 2008 at 4:54 AM, Wolfgang Kerzendorf
<wke...@go...> wrote:
> Dear all,
>
> I find it incredibly hard to work with tick labels in matplotlib (on
> matplotlib 0.98 @ OS X 10.5.4) (It might well be that I haven't
> stumbled across the right solution yet and it is really easy ;-) ). I
Sorry you are having trouble - -suggestions below
> want to first of all change the axis so it displays the normal number
> as ticks and not 0, 1 ,2 ,3 + 6.35e5 or something. I managed that by
You can also just set your own format string:
import matplotlib.ticker as ticker
ax.yaxis.set_major_formatter(ticker.FormatStrFormatter('%1.2f')
> reading the ticks and then converting it to strings and use the
> set_ticklabels to get that. The second thing is that I want to make
> the font smaller, e. g. to 'x-small' at the moment I am using a for
> loop to loop through all xticklabels which is allright but imho looks
> to complicated to do something as simple as that.
You can also set the rc parameter
import matplotlib
matplotlib.rcParams['ytick.major.size'] = 'x-small'
and likewise for minor ticks.
> I also want to change the padding between the axis and the labels, but
> all my attempts at finding the set_pad method have failed because none
> of the axis objects I could think of had that method.
Did you try setting the rc parameter
matplotlib.rcParams['ytick.major.pad'] =6
An example rc is at http://matplotlib.sf.net/matplotlibrc. You can
drop this in ~/.matplotlib and make these customizations permanent if
you want.
> Oh and while I'm at it: Is there a function that plots a two
> dimensional array?
ax.imshow plots images
|
|
From: Wolfgang K. <wke...@go...> - 2008-07-21 09:54:24
|
Dear all,
I find it incredibly hard to work with tick labels in matplotlib (on
matplotlib 0.98 @ OS X 10.5.4) (It might well be that I haven't
stumbled across the right solution yet and it is really easy ;-) ). I
want to first of all change the axis so it displays the normal number
as ticks and not 0, 1 ,2 ,3 + 6.35e5 or something. I managed that by
reading the ticks and then converting it to strings and use the
set_ticklabels to get that. The second thing is that I want to make
the font smaller, e. g. to 'x-small' at the moment I am using a for
loop to loop through all xticklabels which is allright but imho looks
to complicated to do something as simple as that.
I also want to change the padding between the axis and the labels, but
all my attempts at finding the set_pad method have failed because none
of the axis objects I could think of had that method.
So here's my workaround for the first two things (each subplot is one
small window of 6 subplots):
#preparing the subplots()
figure=gcf()
subplots=[]
for i in range(6):
subplots.append(figure.add_subplot(23*10+i+1))
for i,line in enumerate(line_data):
subplots[i].axes.ticklabel_format(style='sci',axis='x')
subplots[i].plot(line[:,0],line[:,1])
new_ticks=map(str,subplots[i].axes.get_xticks())
subplots[i].axes.set_xticklabels(new_ticks)
for ilabel in subplots[i].axes.get_xticklabels():
ilabel.set_fontsize('x-small')
----------------------
Oh and while I'm at it: Is there a function that plots a two
dimensional array?
Thanks in advance
Wolfgang
P.S.: I already looked through the mailing list for the padding issue
but it only mentioned set_pad which I could not find
|
|
From: Matthias M. <Mat...@gm...> - 2008-07-21 07:57:31
|
Hello Hussein, maybe the following example helps you. It uses the module 'time' to wait for some seconds. regards Matthias --------------- "test.dat": ---------------------------------------------- #time x_coordinate y_coordinate 0.1 1 1 0.2 2 2 0.3 3 3 0.4 4 4 -------------------- "... .py": -------------------------------------------------- from scipy.io import read_array import pylab as pl import numpy as npy import time data = read_array("test.dat") pl.ion() # Turn interactive mode on. pl.figure() pl.subplot(111, autoscale_on=False) pl.axis([0.0, 5.0, 0.0, 5.0]) # plot the first point: point, = pl.plot([data[0, 1]], [data[0, 2]], 'b+') pl.draw() print "first (x, y) = ", data[0, 1:] for i in xrange(1, npy.shape(data)[0]): # wait time-difference * 10 seconds time.sleep((data[i, 0]-data[i-1, 0])*10) # reset data of plotted point point.set_data(npy.array([data[i, 1]]), npy.array([data[i, 2]])) pl.draw() pl.draw() print "new (x, y) = ", data[i, 1:] pl.ioff() # Turn interactive mode off. pl.show() ------------------------------------------------------------------------------------------- On Sunday 20 July 2008 21:31:42 hussein alshatri wrote: > Hi all, > > I am new with matplotlib. I want to use matplotlib/animation. > > I want to plot a moving point. The information comes from input file that > include columens as bellow: > > #time x_coordinate y_coordinate > > I have seen the examples on the website, But I don't know how to configure > the time. > > Could anyone just guide me how to do this or if there is a short example it > would be great... > > Thank you in advanced. > > Hussein |
|
From: charlesrkiss <cha...@gm...> - 2008-07-21 06:25:18
|
How about this for a stationary point:
from pylab import *
def point(x,y):
a=arange(x,x+1,1)
b=arange(y,y+1,1)
plot(a,b, 'ro', ms=3)
show()
This works for me.
Load the module "point"
Run it by typing point(x,y), where x and y are the coordinates you'd like to
see in a plot, and a magical red "point" will appear in your matplotlib
figure. You can change the color and size, of course, by modifying the color
('ro') and markersize ('ms= 3') keyword arguments to suit your needs.
Now just put in a t parameter, I guess.
hussein alshatri wrote:
>
>
> Hi all,
>
> I am new with matplotlib. I want to use matplotlib/animation.
>
> I want to plot a moving point. The information comes from input file that
> include columens as bellow:
>
> #time x_coordinate y_coordinate
>
> I have seen the examples on the website, But I don't know how to configure
> the time.
>
> Could anyone just guide me how to do this or if there is a short example
> it would be great...
>
> Thank you in advanced.
>
> Hussein
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
View this message in context: http://www.nabble.com/plot-a-moving-point-from-an-input-file-tp18557820p18562838.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Jeff W. <js...@fa...> - 2008-07-21 02:26:05
|
Ryan May wrote: > Jeff, > > Is there any way to get transform_vector to only adjust the vector for > the projection, not do any interpolation? I have a set of irregularly > arranged points, so I'm unsure how to make it work. > > Ryan > > Ryan: Yes, you can just use the rotate_vector method. Has to be gridded data though, since derivative calculations are involved. -Jeff |
|
From: Ryan M. <rm...@gm...> - 2008-07-21 00:45:50
|
Jeff, Is there any way to get transform_vector to only adjust the vector for the projection, not do any interpolation? I have a set of irregularly arranged points, so I'm unsure how to make it work. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: charlesrkiss <cha...@gm...> - 2008-07-20 20:11:00
|
I would like to know how to plot a stationary point. Do you know how to plot a stationary point?? I will also be interested in plotting a moving point; so I'll be interested in this post. < I want to plot a moving point. The information comes from input file that include columens as bellow: #time x_coordinate y_coordinate -- View this message in context: http://www.nabble.com/plot-a-moving-point-from-an-input-file-tp18557820p18558156.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: hussein a. <sha...@ho...> - 2008-07-20 19:31:49
|
Hi all, I am new with matplotlib. I want to use matplotlib/animation. I want to plot a moving point. The information comes from input file that include columens as bellow: #time x_coordinate y_coordinate I have seen the examples on the website, But I don't know how to configure the time. Could anyone just guide me how to do this or if there is a short example it would be great... Thank you in advanced. Hussein _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |
|
From: John H. <jd...@gm...> - 2008-07-19 17:11:55
|
On Sat, Jul 19, 2008 at 10:19 AM, Bryan Fodness <bry...@gm...> wrote: > I would like the xticks and yticks on the central axis to look like the > attached png. Right now, I am just using axvline and axhline. Tony Yu is working on adding support for this but it is not complete yet. JDH |
|
From: John H. <jd...@gm...> - 2008-07-19 17:11:05
|
Tom, please subscribe to matplotlib users at http://lists.sourceforge.net/mailman/listinfo/matplotlib-users and direct questions to the mailing list rather than me directly. I'm forwarding this question on to the list ---------- Forwarded message ---------- From: <ee...@be...> Date: Sat, Jul 19, 2008 at 9:59 AM Subject: Multiple plots from multiple files in one figure? To: jd...@gm... John, Thanks for all the great work. I'm new to both matplotlib & Python, so please forgive any ignorance. I would like to plot multiple CSV files on a single set of axes. Specifically, I want to duplicate your Yahoo ticker data example, but plotting multiple tickers on the same figure so that I can compare performance. Is there some easy way to do this? Thanks for the help. Tom John Hunter-4 wrote: > > On 6/8/07, Lionel Roubeyrie <lro...@li...> wrote: >> Hi John, >> very very interesting idea. >> Is there a way to add some extras informations on the records arrays >> columns, >> like the units or/and the desired labels for the resulting plotted lines, >> directly retrieved in the CSV files? > > It could be done, but my goal here is not to create a persistence > layer for record arrays, or a method of describing them or mpl labels, > but rather a way to easily import 3rd party CSV files into numpy > record arrays. I work with a lot of tab/space/ascii delimited files, > and found myself duplicating a lot of code importing them into record > arrays. This function is the distillation of that code. It would be > fairly easy to add designated rows for those who did want to decorate > their CSV files. I think it might be most useful to support a row > that provided a numpy dtype per column, or perhaps the name of a > converter function... > > One thing people coming from gnuplot miss is file plotting > functionality. I just added a function to pylab called plotfile which > uses the csv2rec functionality (with autolabeling etc) to plot data > from a file. Eg, > >>>> plotfile(fname, (0,5,6)) > > plots columns 5 and 6 against column 0. And > >>>> plotfile(fname, ('date', 'volume', 'adj_close'), > plotfuncs={'volume': 'bar'}) > > does the same using the names of the columns, using "plot" for > adj_close (the default) and "bar" for volume (customization from the > plotfuncs dictionary). The column names in either case are used to > create default x and y labels. > > The 2nd command produces the attached plot. This is just a first > pass, so if people want to see a different interface or have an > opinion what should be returned, or where this function should live > outside of pylab, feel free to comment or commit changes. > > JDH > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > Quoted from: http://www.nabble.com/record-array-and-date-support-tp11011990p11027947.html |
|
From: Eric B. <eri...@gm...> - 2008-07-19 02:43:55
|
With the following snippet, I expect a vertical line from y=(0, 2) and squares at y=(4, 5, 6) at the specified time. No squares appear with the call to scatter, even though the y axis limits adjust to (0,7) as if something is being plotted. Is this a known limitation of scatter? I'm running the following under ipython -pylab. from datetime import datetime f=figure() ax=f.add_subplot(111) d=datetime(2004,05,26,23,00,00) d=date2num(d) ax.xaxis_date() ax.plot((d,d,d),range(3)) # vertical line ax.scatter((d,d,d),(4,5,6),marker='s') # no symbols plotted draw() Thanks, Eric |
|
From: Ben A. <bax...@co...> - 2008-07-18 21:54:40
|
I am trying to plot some 2D scatter plot data where:
* the points have a colormap
* some points have larger, colored circles on them
* some points have a dark ring around them
I have managed to get this functionality to work by using both the scatter() and plot() commands. My problem is that the dark rings printed by the plot() command do not line up with the circles of the scatter() command. (Example file below).
My question is this:
* Is there a way to set an offset for one of these plotting methods so that they line up properly? Setting it in the X/Y data will not work because it will not be scale independent.
* Or is there a way to use only one plotting method? I can't seem to get plot() to draw different colors, and I can't get scatter() to draw a wide ring.
Thanks,
-Ben
####################
from pylab import *
N = 30
x = 0.9*rand(N)
y = 0.9*rand(N)
z = 0.9*rand(N)
w = 0.9*rand(N)
scatter(x, y, c=z)
scatter(x[:10],
y[:10],
s=120,
c=w[:10],
marker='o',
alpha=0.4)
plot(x[5:15],
y[5:15],
'o',
markersize=15,
markeredgecolor='k',
markeredgewidth=2,
markerfacecolor='none')
show()
############################
|
|
From: John H. <jd...@gm...> - 2008-07-18 14:32:01
|
On Fri, Jul 18, 2008 at 6:12 AM, Ian Harry <ian...@as...> wrote:
> Hi Darren,
> /home/spxiwh/matplotlibinstall/lib64/python2.4/site-packages/matplotlib/__init__.py:801:
> UserWarning: This call to matplotlib.use() has no effect
> because the the backend has already been chosen;
> matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
> or matplotlib.backends is imported for the first time.
>
> at the top of all of our plotting routine outputs now.
>
> This sounds like we have bugs in our code, which we need to deal with before
> we can upgrade our numpy and matplotlib versions. Because of time
> restraints, it is likely that upgrading of these modules on our systems will
> not happen for a few months. Using MPLCONFIGDIR should stop most of our
> failures anyway, I guess we can solve the rest by automatically retrying
> failed jobs.
>
For your own sake, this use bug should be fixed because it means mpl
is not doing what you think. The backend needs to be set before pylab
is imported. The two main ways to set the backend are in the rc file
and with the use directive. If you do the latter, make sure you put
import matplotlib
matplotlib.use('YourBackend')
near the top of your main driver code, before you import pylab or any
other modules which import it. You should also do this only in one
place in your code. If you try and do it after you import pylab, and
your backend is already set to something else from your rc files, your
code will break .
JDH
|
|
From: Ian H. <ian...@as...> - 2008-07-18 11:12:10
|
Hi Darren,
I have updated from svn and tried to run the code. It is not working, but,
the failures have nothing to do with texmanager.py. I'm getting some of our
codes failing from within one of our __init__.py files (my guess is a naming
conflict). And some more codes failing with:
File
"/home/spxiwh/matplotlibinstall/lib64/python2.4/site-packages/matplotlib/axes.py",
line 263, in _xy_from_xy
assert nrx == nry, 'Dimensions of x and y are incompatible'
AssertionError: Dimensions of x and y are incompatible
I also get:
/home/spxiwh/matplotlibinstall/lib64/python2.4/site-packages/matplotlib/__init__.py:801:
UserWarning: This call to matplotlib.use() has no effect
because the the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
at the top of all of our plotting routine outputs now.
This sounds like we have bugs in our code, which we need to deal with before
we can upgrade our numpy and matplotlib versions. Because of time
restraints, it is likely that upgrading of these modules on our systems will
not happen for a few months. Using MPLCONFIGDIR should stop most of our
failures anyway, I guess we can solve the rest by automatically retrying
failed jobs.
Thanks for the help
Ian
2008/7/17 Darren Dale <dsd...@gm...>:
> On Wednesday 16 July 2008 07:20:59 am Ian Harry wrote:
> > [spxiwh@sugar 07:14 AM matplotlib]$ diff texmanager.py
> > /usr/lib64/python2.4/site-packages/matplotlib/texmanager.py
> > 248c248
> > < fh = file(outfile,'a')
> > ---
> >
> > > fh = file(outfile)
> >
> > 252,254c252
> > < else:
> > < try: verbose.report(fh.read(), 'debug')
> > < except: pass
> > ---
> >
> > > else: verbose.report(fh.read(), 'debug')
> >
> > 259,261c257,258
> > < else:
> > < try: os.remove(fname)
> > < except: pass
> > ---
> >
> > > else: os.remove(fname)
> >
> > 280c277
> > < fh = file(outfile,'a')
> > ---
> >
> > > fh = file(outfile)
> >
> > 285,287c282
> > < else:
> > < try: verbose.report(fh.read(), 'debug')
> > < except: pass
> > ---
> >
> > > else: verbose.report(fh.read(), 'debug')
> >
> > 289,290c284
> > < try: os.remove(outfile)
> > < except: pass
> > ---
> >
> > > os.remove(outfile)
> >
> > 314c308
> > < # else: verbose.report(fh.read(), 'debug')
> > ---
> >
> > > else: verbose.report(fh.read(), 'debug')
> >
> > --snip--
>
> I took a different approach:
>
> Index: lib/matplotlib/texmanager.py
> ===================================================================
> --- lib/matplotlib/texmanager.py (revision 5771)
> +++ lib/matplotlib/texmanager.py (working copy)
> @@ -273,16 +273,22 @@
> %(os.path.split(texfile)[-1], outfile))
> mpl.verbose.report(command, 'debug')
> exit_status = os.system(command)
> - fh = file(outfile)
> + try:
> + fh = file(outfile)
> + report = fh.read()
> + fh.close()
> + except IOError:
> + report = 'No latex error report available.'
> if exit_status:
> raise RuntimeError(('LaTeX was not able to process the
> following \
> -string:\n%s\nHere is the full report generated by LaTeX: \n\n'% repr(tex))
> +
> fh.read())
> - else: mpl.verbose.report(fh.read(), 'debug')
> - fh.close()
> +string:\n%s\nHere is the full report generated by LaTeX: \n\n'% repr(tex))
> +
> report)
> + else: mpl.verbose.report(report, 'debug')
> for fname in glob.glob(basefile+'*'):
> if fname.endswith('dvi'): pass
> elif fname.endswith('tex'): pass
> - else: os.remove(fname)
> + else:
> + try: os.remove(fname)
> + except OSError: pass
>
> return dvifile
>
> @@ -305,14 +311,19 @@
> os.path.split(dvifile)[-1], outfile))
> mpl.verbose.report(command, 'debug')
> exit_status = os.system(command)
> - fh = file(outfile)
> + try:
> + fh = file(outfile)
> + report = fh.read()
> + fh.close()
> + except IOError:
> + report = 'No dvipng error report available.'
> if exit_status:
> raise RuntimeError('dvipng was not able to \
> process the flowing file:\n%s\nHere is the full report generated by
> dvipng: \
> -\n\n'% dvifile + fh.read())
> - else: mpl.verbose.report(fh.read(), 'debug')
> - fh.close()
> - os.remove(outfile)
> +\n\n'% dvifile + report)
> + else: mpl.verbose.report(report, 'debug')
> + try: os.remove(outfile)
> + except OSError: pass
>
> return pngfile
>
>
> Would you update from svn and see if it works for you?
>
> Thanks,
> Darren
>
--
---------------------------------------------------------------------------
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: John H. <jd...@gm...> - 2008-07-18 03:36:37
|
On Thu, Jul 17, 2008 at 10:28 PM, Ryan May <rm...@gm...> wrote: > I helped Eric out with this offline, and obviously set_array is for the > colors, but the only solution we could come up with was to directly > reset the PolyCollection._offsets member. This seems a little hacky. > Is there any reason that there is not an set_offsets() (or something > like it)? Any reason why I shouldn't code up a patch? No, I can't thing of any reason why this attribute should not be publicly settable, so patch away. Thanks, JDH |
|
From: Ryan M. <rm...@gm...> - 2008-07-18 03:28:21
|
Eric Bruning wrote: > I have scatterplots on several axes that are dynamically updated, and > thus I need to keep track of each of the PolyCollection artists that > represent the scattered data. I would like to keep the same > PolyCollection object but update the positions, colors, etc. of the > symbols, possibly changing their total number, something along the > lines of Line.set_data. > > Did I miss a method that would do what I want? > > I have already looked at removing the collection from the axes and > replotting, but for some reason my axis limits get reset when I do so. Guys, I helped Eric out with this offline, and obviously set_array is for the colors, but the only solution we could come up with was to directly reset the PolyCollection._offsets member. This seems a little hacky. Is there any reason that there is not an set_offsets() (or something like it)? Any reason why I shouldn't code up a patch? Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Ryan M. <rm...@gm...> - 2008-07-18 03:09:07
|
Michael Droettboom wrote: > Oz Nahum wrote: >> I am mostly frustrated with documentation writers who write very nice >> tutorials describing how to plot completely unusfull graphs of spheres >> inside loops and a dolphin swimming in the middle. > I'm sorry. I just couldn't resist writing a tutorial example for this. > Please take it in the spirit of fun it was intended. That's freaking hilarious. Someone clearly has too much time on their hands. (Yeah right.) Goes to show the power of matplotlib though. Nice one. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: John H. <jd...@gm...> - 2008-07-17 19:50:45
|
On Thu, Jul 17, 2008 at 2:35 PM, Ben Axelrod <bax...@co...> wrote:
> It seems that axes.plot() handles 'None' values in the input arrays
> gracefully by just not plotting that point. But axes.scatter() bugs out.
> Can this be fixed?
We try to support np.nan and np masked arrays to handle missing data.
The fact that None works with plot is a fortuitous consequence of the
fact that numpy converts None->NaN on a coercion to float, but it is
not something we plan on trying to support explicitly. You can easily
write your own none_to_nan function
def none_to_nan(seq):
return np.asarray(seq, float)
and if nans are failing we'll treat it as a bug in mpl
JDH
|
|
From: Ben A. <bax...@co...> - 2008-07-17 19:35:30
|
It seems that axes.plot() handles 'None' values in the input arrays gracefully by just not plotting that point. But axes.scatter() bugs out. Can this be fixed? Thanks, -Ben |
|
From: John H. <jd...@gm...> - 2008-07-17 18:57:37
|
On Thu, Jul 17, 2008 at 1:53 PM, Ben Axelrod <bax...@co...> wrote: > It seems like this should be possible: > > > > ax.scatter(x, y, c=None) Just use plot(x, y, 'o') or whatever marker you want, and set the markersize. scatter is meant for plots where either the marker size or marker color vary. plot handles homogeneous markers. JDH |
|
From: Ben A. <bax...@co...> - 2008-07-17 18:53:16
|
It seems like this should be possible: ax.scatter(x, y, c=None) but axes chokes on the c=None parameter. |
|
From: John H. <jd...@gm...> - 2008-07-17 18:36:43
|
On Thu, Jul 17, 2008 at 12:42 PM, Michael Droettboom <md...@st...> wrote:
> Anyone have any thoughts on this? It seems like it's serious enough to try
> to resolve before the next bugfix release.
I think what we are seeing here is the known GUI figure canvas leak
(Michael, I think our offlist conversation about mainquit was a red
herring since removing that call doesn't help). We have found in the
past that creation of gtk canvases and tk canvases leak and this is
outside mpl. The reason that commenting out del Gcf.figs[num] "fixes"
the leak because it causes pyplot to simply reuse the figure rather
than re-call new_figure_manager. The chain of logic
_pylab_helpers.Gcf:
def get_fig_manager(num):
figManager = Gcf.figs.get(num, None)
if figManager is not None: Gcf.set_active(figManager)
return figManager
pyplot.figure
figManager = _pylab_helpers.Gcf.get_fig_manager(num)
if figManager is None:
if get_backend().lower() == 'ps': dpi = 72
figManager = new_figure_manager(num, figsize=figsize,
dpi=dpi,
facecolor=facecolor,
edgecolor=edgecolor,
frameon=frameon,
FigureClass=FigureClass,
**kwargs)
so when you do not del the figure number, the manager still lives in
the dictionary in Gcf and is returned by
_pylab_helpers.Gcf.get_fig_manager(num), and so subsequent calls to
new_figure_manager are not triggered (so the figure is not really
closed...)
So there is a bug here, but I am not sure it is in mpl -- I think it
is more likely to be in the GUI toolkits themselves, as we do not see
them in any of the mpl image backends. I don't think we need to hold
a release on this, since it is a known and existing problem with no
obvious mpl solution, though getting a reproducible test case that
just used the GUI code for submission to pygtk, tkinter, etc... would
be useful.
JDH
Michael and I just talked through this offlist, and it appears that
what is happening is that form any of the interactive backends, the
trigger to stop the GUI mainloop is when all the figures have been
closed. The typical use case in a script is to raise several GUI
figures and the program exits when all of them have been closed.
pylab otherwise doesn't know when to quit and return the shell prompt.
The backend first checks to see if you are in interactive mode, and
does not call main quit if you are, so this doesn't affect folks using
mpl in an ipython shell or other interactive sessions.
The only use case where it should arise is like the one in looptest,
where a script creates a GUI figure and then closes it in
non-interactive mode. Although there is a use case where this makes
sense (eg if we had a blocking show) where one would create a figure,
raise it, block, close it, rinse and repeat, this mode is not
currently supported in pylab (show would need to be smarter, though
with our new blocking input functions we might be able to attempt
this). This also does not affect applications since the close/destroy
handling is a pyplot construct.
Michael pointed out that the twinx problem was separate (and fixed) so
is unrelated to the close bug and can be removed from the looptest
test script.
There is a workaround for those who really need this functionality,
although it is unsupported currently, and that is simply to wrap the
close call in ion/ioff function calls to turn interaction on. The
interactive backends won't attempt to call mainquit if interactive
mode is on, so
PL.ion()
PL.close(1)
PL.ioff()
blocks this leak
|