You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(33) |
Dec
(20) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(7) |
Feb
(44) |
Mar
(51) |
Apr
(43) |
May
(43) |
Jun
(36) |
Jul
(61) |
Aug
(44) |
Sep
(25) |
Oct
(82) |
Nov
(97) |
Dec
(47) |
| 2005 |
Jan
(77) |
Feb
(143) |
Mar
(42) |
Apr
(31) |
May
(93) |
Jun
(93) |
Jul
(35) |
Aug
(78) |
Sep
(56) |
Oct
(44) |
Nov
(72) |
Dec
(75) |
| 2006 |
Jan
(116) |
Feb
(99) |
Mar
(181) |
Apr
(171) |
May
(112) |
Jun
(86) |
Jul
(91) |
Aug
(111) |
Sep
(77) |
Oct
(72) |
Nov
(57) |
Dec
(51) |
| 2007 |
Jan
(64) |
Feb
(116) |
Mar
(70) |
Apr
(74) |
May
(53) |
Jun
(40) |
Jul
(519) |
Aug
(151) |
Sep
(132) |
Oct
(74) |
Nov
(282) |
Dec
(190) |
| 2008 |
Jan
(141) |
Feb
(67) |
Mar
(69) |
Apr
(96) |
May
(227) |
Jun
(404) |
Jul
(399) |
Aug
(96) |
Sep
(120) |
Oct
(205) |
Nov
(126) |
Dec
(261) |
| 2009 |
Jan
(136) |
Feb
(136) |
Mar
(119) |
Apr
(124) |
May
(155) |
Jun
(98) |
Jul
(136) |
Aug
(292) |
Sep
(174) |
Oct
(126) |
Nov
(126) |
Dec
(79) |
| 2010 |
Jan
(109) |
Feb
(83) |
Mar
(139) |
Apr
(91) |
May
(79) |
Jun
(164) |
Jul
(184) |
Aug
(146) |
Sep
(163) |
Oct
(128) |
Nov
(70) |
Dec
(73) |
| 2011 |
Jan
(235) |
Feb
(165) |
Mar
(147) |
Apr
(86) |
May
(74) |
Jun
(118) |
Jul
(65) |
Aug
(75) |
Sep
(162) |
Oct
(94) |
Nov
(48) |
Dec
(44) |
| 2012 |
Jan
(49) |
Feb
(40) |
Mar
(88) |
Apr
(35) |
May
(52) |
Jun
(69) |
Jul
(90) |
Aug
(123) |
Sep
(112) |
Oct
(120) |
Nov
(105) |
Dec
(116) |
| 2013 |
Jan
(76) |
Feb
(26) |
Mar
(78) |
Apr
(43) |
May
(61) |
Jun
(53) |
Jul
(147) |
Aug
(85) |
Sep
(83) |
Oct
(122) |
Nov
(18) |
Dec
(27) |
| 2014 |
Jan
(58) |
Feb
(25) |
Mar
(49) |
Apr
(17) |
May
(29) |
Jun
(39) |
Jul
(53) |
Aug
(52) |
Sep
(35) |
Oct
(47) |
Nov
(110) |
Dec
(27) |
| 2015 |
Jan
(50) |
Feb
(93) |
Mar
(96) |
Apr
(30) |
May
(55) |
Jun
(83) |
Jul
(44) |
Aug
(8) |
Sep
(5) |
Oct
|
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Kirill L. <ki...@la...> - 2004-06-09 01:26:46
|
Jeremy,
> Not really. I am mostly interested in interactive usage, hence I
> am simply firing python or ipython from console, and then in
> python shell issuing couple of commands like:
>
> >>> from matplotlib.matlab import *
> >>> plot((1,2,3))
>
>
> You probably want.
>
> import matplotlib
> matplotlib.interactive(True)
> matplotlib.use('WX')
> from matplotlib.matlab import *
> plot([1,2,3])
What I forgot to mention is that I changed .matplotlibrc to use WX and
interactive mode. In fact, all tests I did were performed the same way
-- change .matplotlibrc to choose backend and set interactive to True or
False, then open python from console try import/plot, open pythonwin try
import/plot. I presume there is no difference between setting
backend/interactivity via .matplotlibrc or via explicit calls to
matplotlib api.
> There are a couple of issues I keep meaning to get around to fixing.
> One problem is that I don't really use interactive mode, so I don't
> notice things so much in that area (not that this is an excuse...).
> The key difficulty is that the mainloop behaves subtly differently
> when running interactively and from a script. Every time I make one
> work correctly, it seems to break the other in unpredictable ways.
Yeah, quite a lot of different options to test, a lot of platforms, not
to mention that testing GUI is hard by itself. World would be so much
better if one could easily unittest GUIs.
>
> The -dWX option tells matplotlib to use the Wx renderer to run the
> script. You can also set the preferred default renderer in the
> matplotlibrc file. As installed, I think this defaults to GtkAgg, but
> you can change it (see http://matplotlib.sourceforge.net/.matplotlibrc).
Oh, so that's yet another way to switch backends? Good to know.
> Boa is quite buggy in places, and imposes its own way of working with
> Wx that doesn't suit me (at least for larger projects). However, the
> debugger is worth the effort.
I see. I guess I have to find a combination of satisfactory IDE /
matplotlib backend. From what I see now, Boa is pretty much the last
resort for windows.
BTW, does anyone know what the situation is with various IDE /
matplotlib backends compatibility on Linux? Particularly I am curious to
know if there is a way to use matplotlib from Eric3, which is a QT based
app.
> We've looked at different ways to deal with the mainloop problem, but
> it is difficult to find a portable approach. It would probably be
> quite straightforward to look at sys.argv and issue a different
> matplotlib.use() call from there. Not sure that this would be easy to
> generalise (as there are so many possible shells).
>
> In the longer term, John Hunter has been looking at putting the GUI
> into a separate thread, to avoid mainloop problems. A partial solution
> exists within scipy for this, but only applies, if memory serves, to
> Wx only, whereas we would need a solution for all backends. We're
> aware that this is quite annoying, although to be honest I think that
> most people use only one backend with their preferred tools.
I see your point, the only reason I asked about automatic backend
selection is because I may want to use matplotlib from different tools,
say an IDE, xemacs, ipython, and it might be that they will require
different backends, so I'll have to select one manually every time which
is quite annoying. I guess we'll have to cope with it for now, hoping
that one day you'll put GUI into a separate thread and it will resolve
all issues.
BTW, how about plotting from separate process? Pickle data, send via
some interprocess communication or even temporary file to plotting
process. This should not be too hard to implement, right? It might be
yet another backend.
--Kirill
|
|
From: Jared W. <wah...@um...> - 2004-06-08 21:49:17
|
On Tue, 2004-06-08 at 16:47, John Hunter wrote: > >>>>> "Jared" == Jared Wahlstrand <wah...@um...> writes: > > Jared> Hello, I put a patch in the tracker that implements groups > Jared> in the SVG backend. Is that the preferred way to submit > Jared> patches, or should I just mail them? > > Since we're just talking about a single file, I think mailing them > directly to me is the easiest way for now. BTW, the attachment didn't > go through on the Tracker. > Oops...the groups patch is hopefully attached to this message. > Jared> I've also been working on images. SVG has an image tag > Jared> where you can include a external .png file. I used some > Jared> code from the GTK backend to save an image as a png, then > Jared> included, as shown below. > > I think you'll be better off following the lead of how backend PS > handles image drawing, which has no GTK dependence. I don't think you > need to use GTK or PNG as an intermediary. You may want to get a > fresh CVS checkout because there was a screwup in the width/height > dimensions in earlier versions that has been fixed. I don't see any obvious way to directly include a bitmap in SVG, but I'll keep looking. |
|
From: John H. <jdh...@ac...> - 2004-06-08 21:12:09
|
>>>>> "Jared" == Jared Wahlstrand <wah...@um...> writes:
Jared> Hello, I put a patch in the tracker that implements groups
Jared> in the SVG backend. Is that the preferred way to submit
Jared> patches, or should I just mail them?
Since we're just talking about a single file, I think mailing them
directly to me is the easiest way for now. BTW, the attachment didn't
go through on the Tracker.
Jared> I've also been working on images. SVG has an image tag
Jared> where you can include a external .png file. I used some
Jared> code from the GTK backend to save an image as a png, then
Jared> included, as shown below.
I think you'll be better off following the lead of how backend PS
handles image drawing, which has no GTK dependence. I don't think you
need to use GTK or PNG as an intermediary. You may want to get a
fresh CVS checkout because there was a screwup in the width/height
dimensions in earlier versions that has been fixed.
Glad to see you're making progress!
JDH
|
|
From: Jared W. <wah...@um...> - 2004-06-08 20:52:01
|
Hello, I put a patch in the tracker that implements groups in the SVG
backend. Is that the preferred way to submit patches, or should I just
mail them?
I've also been working on images. SVG has an image tag where you can
include a external .png file. I used some code from the GTK backend to
save an image as a png, then included, as shown below.
def draw_image(self, x, y, im):
"""
Draw the Image instance into the current axes; x, y is the
upper left hand corner of the image
"""
rows, cols, s = im.as_str()
X = fromstring(s, UInt8)
X.shape = rows, cols, 4
pb=gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,
has_alpha=1, bits_per_sample=8,
width=cols, height=rows)
try: pa = pb.get_pixels_array()
except AttributeError: pa = pb.pixel_array
pa[:,:,:] = X
gc = self.new_gc()
pb.save('test.png','png')
self._draw_rawsvg('<image x=\"%f\" y=\"%f\" width=\"%f\"
height=\"%f\" xlink:href=\"test.png\"></image>' % (x, self.height-y,
cols, rows))
The above works for 'image_demo2.py' in the examples. The downside of
this approach is that it would make the SVG backend dependent on GTK.
Can anyone think of a better way?
I was thinking of naming the png files 'filename_1.png',
'filename_2.png', etc. for each image in the figure, where
'filename.svg' is the name of the main file. What do you think?
jared
|
|
From: Jeremy O'D. <je...@o-...> - 2004-06-08 17:30:52
|
On 8 Jun 2004, at 13:51, Kirill Lapshin wrote:
> Jeremy,
>
> Thanks for fast response.
>
>>
>> I'm assuming that you're running from the console in the recommended
>> way (i.e pythonw file.py -dWX).
>
> Not really. I am mostly interested in interactive usage, hence I am
> simply firing python or ipython from console, and then in python shell
> issuing couple of commands like:
>
> >>> from matplotlib.matlab import *
> >>> plot((1,2,3))
You probably want.
import matplotlib
matplotlib.interactive(True)
matplotlib.use('WX')
from matplotlib.matlab import *
plot([1,2,3])
See the explanation a bit further down.
>
>> I am not surprised that you are having problems running the Wx
>> backend from Idle and/or PythonWin. It is generally problematic to
>> launch a GUI app from an application which uses a different GUI
>> backend (e.g a Wx app from Idle (which is Tk)) as the event loops get
>> in each others' way. There are a few things I have to fix in the
>> window close code for Wx anyway (it's broken in some respects) - for
>> the moment the recommended way is to use the 'close window' button.
>
> Oh, I see. That explains it. I tried it from PyCrust and it does work
> much better, though still there are some rough edges. Interactive mode
> works, which is the most important one for me, but non-interactive
> does not return back to python prompt after show() command, also
> cursor turns into hourglasses when it is over plot window. Looks like
> there are still some problems with message loop.
There are a couple of issues I keep meaning to get around to fixing.
One problem is that I don't really use interactive mode, so I don't
notice things so much in that area (not that this is an excuse...). The
key difficulty is that the mainloop behaves subtly differently when
running interactively and from a script. Every time I make one work
correctly, it seems to break the other in unpredictable ways.
>> However, I'm quite concerned that launching from the Windows console
>> causes problems. It should work correctly, provided that python is on
>> the path and WxPython is installed correctly in site-lib.
>
> Yes, python is on the path, wxPython installed correctly in
> site-packages. So what is the deal with "recommended way" of running
> from console? pythonw will detach from console, but what -dWX do? It
> is passed as an argument to script, so looks like it is responsibility
> of the script to use it. Does that mean that WX backend can not be
> used from regular console python shell? That would be quite
> unfortunate, because for example IPython only runs interactively on
> console.
The -dWX option tells matplotlib to use the Wx renderer to run the
script. You can also set the preferred default renderer in the
matplotlibrc file. As installed, I think this defaults to GtkAgg, but
you can change it (see
http://matplotlib.sourceforge.net/.matplotlibrc).
Your other option is to follow
(http://matplotlib.sourceforge.net/interactive.html) and do
import matplotlib
matplotlib.interactive(True)
matplotlib.use('WX')
from matplotlib.matlab import *
plot([1,2,3])
...
This has the effect of hard-wiring the backend before importing the
remainder of the matplotlib symbols.
>
>> I'd recommend boa-constructor
>> (http://boa-constructor.sourceforge.net) for debugging Wx code. It's
>> a pretty decent IDE, contains the best debugger I've yet found for
>> Python, and is based on the Wx toolkit, so doesn't have the event
>> loop issue mentioned above.
>
>
> Last time I checked Boa, it was quite buggy. Maybe it is time to give
> it a second try. Thanks for the pointer.
Boa is quite buggy in places, and imposes its own way of working with
Wx that doesn't suit me (at least for larger projects). However, the
debugger is worth the effort.
> I am hoping someone familiar with TkAgg backend will step out and help
> with Tk problems.
>
> BTW, since decision which backend to use depends quite a lot on
> program you are running matplotlib from, would it be possible to
> autodetect host program and choose appropriate backend?
We've looked at different ways to deal with the mainloop problem, but
it is difficult to find a portable approach. It would probably be quite
straightforward to look at sys.argv and issue a different
matplotlib.use() call from there. Not sure that this would be easy to
generalise (as there are so many possible shells).
In the longer term, John Hunter has been looking at putting the GUI
into a separate thread, to avoid mainloop problems. A partial solution
exists within scipy for this, but only applies, if memory serves, to Wx
only, whereas we would need a solution for all backends. We're aware
that this is quite annoying, although to be honest I think that most
people use only one backend with their preferred tools.
Regards
Jeremy |
|
From: John H. <jdh...@ac...> - 2004-06-08 14:08:23
|
>>>>> "Kirill" == Kirill Lapshin <ki...@la...> writes:
Kirill> Oh, I see. That explains it. I tried it from PyCrust and
Kirill> it does work much better, though still there are some
Kirill> rough edges. Interactive mode works, which is the most
Kirill> important one for me, but non-interactive does not return
Kirill> back to python prompt after show() command, also cursor
Kirill> turns into hourglasses when it is over plot window. Looks
Kirill> like there are still some problems with message loop.
This isn't too surprising. One thing show does in backend_wx is
if not matplotlib.is_interactive():
wxapp.MainLoop()
Ie, if you issue show and you are not in interactive mode, you'll have
dualing wx mainloops. Moral of the story - make sure your IDE toolkit
matches your backend toolkit and set interactive : True in
matplotlibrc if you want to work interactively. All other
combinations are expected to fail.
>> However, I'm quite concerned that launching from the Windows
>> console causes problems. It should work correctly, provided
>> that python is on the path and WxPython is installed correctly
>> in site-lib.
Kirill> Yes, python is on the path, wxPython installed correctly
Kirill> in site-packages. So what is the deal with "recommended
Kirill> way" of running from console? pythonw will detach from
Kirill> console, but what -dWX do? It is passed as an argument to
Kirill> script, so looks like it is responsibility of the script
Kirill> to use it. Does that mean that WX backend can not be used
Kirill> from regular console python shell? That would be quite
Kirill> unfortunate, because for example IPython only runs
Kirill> interactively on console.
No, in general, the only backend that can be used from a regular
console python shell is tkagg. To use GTK* interactively, you need to
use one of the GTK shells described on
http://matplotlib.sourceforge.net/interactive.html and to use WX
interactively you need pycrust or another wxpython shell. This is a
threading issue. Unfortunately, getting the standard python shell to
play nicely with GUI threading is not trivial. The best attempt thus
far is scipy's gui_thread which according to some reports is still
immature and is definitely not generic across GUI toolkits.
Kirill> I am hoping someone familiar with TkAgg backend will step
Kirill> out and help with Tk problems.
See Todd's suggestions on the user list. I think you should have no
trouble with ipython or the standard python shell with the following
settings in matplotlibrc
backend : TkAgg
interactive : True
tk.window_focus : True
This last setting doesn't play nice with IDLE if I recall correctly so
use with caution. If you encounter troubles with this combination
please let us know.
Kirill> BTW, since decision which backend to use depends quite a
Kirill> lot on program you are running matplotlib from, would it
Kirill> be possible to autodetect host program and choose
Kirill> appropriate backend?
We've talked about it before. It shouldn't bee too hard to inspect
sys.modules and figure this out. I'm not sure how it should be
handled vis-a-vis matplotlibrc. Perhaps we a new default
backend : Auto
which
1) Inspects sys.modules to see if a GUI toolkit is loaded and uses
it if so
2) Otherwise tries to load systematically load gui toolkits in a
platform dependent manner (wxpython or tk for enthought/win32,
gtk for linux, etc) and with success sets the backend
3) falls back on Agg or a warning if all three fail
Of course if the user explicitly sets the backend this pathway would
be ignored.
I'm on the fence as to whether this is a good idea. If we automate
too much it becomes more difficult to figure out what is going on in
case of problems, and it prevents users from figuring out how to
customize and control matplotlib. On the other hand, if people throw
up their hands in disgust with repeated failures and complexities,
that is a bad thing.
JDH
|
|
From: Kirill L. <ki...@la...> - 2004-06-08 12:51:43
|
Jeremy, Thanks for fast response. > > I'm assuming that you're running from the console in the recommended > way (i.e pythonw file.py -dWX). Not really. I am mostly interested in interactive usage, hence I am simply firing python or ipython from console, and then in python shell issuing couple of commands like: >>> from matplotlib.matlab import * >>> plot((1,2,3)) > I am not surprised that you are having problems running the Wx backend > from Idle and/or PythonWin. It is generally problematic to launch a > GUI app from an application which uses a different GUI backend (e.g a > Wx app from Idle (which is Tk)) as the event loops get in each others' > way. There are a few things I have to fix in the window close code for > Wx anyway (it's broken in some respects) - for the moment the > recommended way is to use the 'close window' button. Oh, I see. That explains it. I tried it from PyCrust and it does work much better, though still there are some rough edges. Interactive mode works, which is the most important one for me, but non-interactive does not return back to python prompt after show() command, also cursor turns into hourglasses when it is over plot window. Looks like there are still some problems with message loop. > However, I'm quite concerned that launching from the Windows console > causes problems. It should work correctly, provided that python is on > the path and WxPython is installed correctly in site-lib. Yes, python is on the path, wxPython installed correctly in site-packages. So what is the deal with "recommended way" of running from console? pythonw will detach from console, but what -dWX do? It is passed as an argument to script, so looks like it is responsibility of the script to use it. Does that mean that WX backend can not be used from regular console python shell? That would be quite unfortunate, because for example IPython only runs interactively on console. > I'd recommend boa-constructor (http://boa-constructor.sourceforge.net) > for debugging Wx code. It's a pretty decent IDE, contains the best > debugger I've yet found for Python, and is based on the Wx toolkit, so > doesn't have the event loop issue mentioned above. Last time I checked Boa, it was quite buggy. Maybe it is time to give it a second try. Thanks for the pointer. I am hoping someone familiar with TkAgg backend will step out and help with Tk problems. BTW, since decision which backend to use depends quite a lot on program you are running matplotlib from, would it be possible to autodetect host program and choose appropriate backend? Thanks, Kirill. |
|
From: Jeremy O'D. <je...@o-...> - 2004-06-08 05:48:14
|
Hello Kirill, I'm the WX maintainer for Matplotlib, so hopefully can cover a couple of your issues with WX. > WX/WXAgg -- both don't work from console -- show empty window, cursor > turns in hourglass when it is over plot window. From GUI app > (IDLE/PythonWin) it seems to work at first glance -- plot gets created, > but the plot window can not be closed with either Alt-F4 or mouse. It > just does not react on close command. Moreover, python objects > corresponding to window seems to get destroyed when I try to close > window, because if I do few plots commands without trying to close the > window, new plots appear in first window, however as soon as I try to > close the window (it won't close, remember?), new plots will open new > window. That second window can be closed, but first one still remain > unclosable. I'm assuming that you're running from the console in the recommended way (i.e pythonw file.py -dWX). I am not surprised that you are having problems running the Wx backend from Idle and/or PythonWin. It is generally problematic to launch a GUI app from an application which uses a different GUI backend (e.g a Wx app from Idle (which is Tk)) as the event loops get in each others' way. There are a few things I have to fix in the window close code for Wx anyway (it's broken in some respects) - for the moment the recommended way is to use the 'close window' button. I tend to prefer to use the PyCrust console for Wx (it's part of the Wx distribution) However, I'm quite concerned that launching from the Windows console causes problems. It should work correctly, provided that python is on the path and WxPython is installed correctly in site-lib. > Any ideas how that can be fixed, work arounded, debugged? I am pretty > comfortable with debugging Python code, but as I said I don't have C > compiler yet, so can't debug extensions. I'd recommend boa-constructor (http://boa-constructor.sourceforge.net) for debugging Wx code. It's a pretty decent IDE, contains the best debugger I've yet found for Python, and is based on the Wx toolkit, so doesn't have the event loop issue mentioned above. Good luck Jeremy |
|
From: Andrew S. <str...@as...> - 2004-05-28 05:17:46
|
On May 27, 2004, at 10:31 AM, John Hunter wrote:
> Another thing that might be useful for SVG is to add grouping
> elements. Eg, in axes.draw we could add
>
> def draw(...)
>
> renderer.begin_group('axes')
> ..plot a bunch of stuff
> renderer.end_group('axes')
Not that I have any clue how it's implemented, but Adobe Illustrator
somehow does this in (E)PS, and PDF formats. It would be so cool if
matplotlib achieved this, too.
But, as matplotlib gets better and better, that becomes less and less
necessary.
Cheers!
Andrew
|
|
From: Paul B. <ba...@st...> - 2004-05-27 20:28:29
|
Jared Wahlstrand wrote: > Here's a more complete version. It works with matplotlib-0.54 now, and > I've tested it with a few of the example scripts, though I'm sure there > are bugs. It doesn't do images or mathtext yet. > > I found out that Inkscape doesn't support clipping yet, so it's sort of > useless right now for some plots. The viewer I used to test the backend > was the Adobe SVG plugin, which is available for lots of platforms: > http://www.adobe.com/svg/ > > It still might be useful to implement PolygonCollections, because it > might decrease the file size if, for the markers, we define a shape with > its properties, and then just translate it to make copies. I also just > noticed the 'marker' element, which looks promising. Nice work. This was on my ToDo list, but it looks like you beat me to it. I'll try running it through its paces in the next few days to how it does. Does this backend use the font_manager to find fonts or does it use the viewers font manager. They are both based on the same principles, but the viewer may do a better job, so you might want to consider by-passing the font-manager. -- Paul Barrett, PhD Space Telescope Science Institute Phone: 410-338-4475 ESS/Science Software Branch FAX: 410-338-4767 Baltimore, MD 21218 |
|
From: John H. <jdh...@ac...> - 2004-05-27 17:54:03
|
>>>>> "Jared" == Jared Wahlstrand <wah...@um...> writes:
Jared> Here's a more complete version. It works with
Jared> matplotlib-0.54 now, and I've tested it with a few of the
Jared> example scripts, though I'm sure there are bugs. It
Jared> doesn't do images or mathtext yet.
I just tried it and actually got simple_plot to work - excellent!
I'm about to do a bug fix release of 0.54. Would you like to release
the code under the matplotlib license? If so I'll include it, but
hold off on announcing it until you are ready.
Another thing that might be useful for SVG is to add grouping
elements. Eg, in axes.draw we could add
def draw(...)
renderer.begin_group('axes')
..plot a bunch of stuff
renderer.end_group('axes')
backend renderers that don't support groupings could just pass on
these calls, but for those who do, like svg, we could add the
appropriate grouping commands. Ditto for legends, axis, etc. This
might help the matplotlib svg output play nicely with svg editors.
JDH
|
|
From: Jared W. <wah...@um...> - 2004-05-27 17:29:01
|
Here's a more complete version. It works with matplotlib-0.54 now, and I've tested it with a few of the example scripts, though I'm sure there are bugs. It doesn't do images or mathtext yet. I found out that Inkscape doesn't support clipping yet, so it's sort of useless right now for some plots. The viewer I used to test the backend was the Adobe SVG plugin, which is available for lots of platforms: http://www.adobe.com/svg/ It still might be useful to implement PolygonCollections, because it might decrease the file size if, for the markers, we define a shape with its properties, and then just translate it to make copies. I also just noticed the 'marker' element, which looks promising. Jared |
|
From: Leon B. <leo...@ne...> - 2004-05-27 05:37:41
|
John, > Would it suffice for you if there was an axes method clear_patches > that simply removed all the previous patches you instantiated? The > reason I ask is because it is not good practice to write scripts > around private attributes which may disappear in a month. It will be great - maybe just a "clipping" value set for an axes. In my case: ax.set_clip(60) Thanks Leon |
|
From: John H. <jdh...@ac...> - 2004-05-26 17:00:58
|
>>>>> "Leon" == Leon Brits <leo...@ne...> writes:
Leon> I have noticed that there are 10 entries made to the
Leon> 'patches'-data for every bargraph I add. Can you explain
Leon> this - and/or possibly direct me to a page to read up more
Leon> about "_patches".
Sure. There are only a few types of objects in matplotlib that appear
on the canvas: lines, patches, text and images. patches are things
that take up area, like circles and rectangles; the term is borrowed
from matlab. Commands like scatter, hist and bar instantiate the kind
of patch you need (eg Rectangle or RegularPolygon, both of which
derive from the Patch base class in matplotlib.patches) and add it to
the axes via Axes.add_patch. The list of patches that have been added
to the Axes are stored in a (private) variable self._patches which was
not intended to be manipulated by the user (hence the leading
underscore and my reference to the solution as a hack).
The question is: for dynamic graphs, what is the proper interface to
allow you to control, clear, etc, the patches that have been created?
The typical way one does dynamic graphs is to fix the objects (be they
lines, text or patches) and change the data attributes of those
objects (eg x and y locations, height). But your is a special case
because there is a fair amount of logic involved in getting the
attributes right for stacked bar graphs so it is probably easier to
clear the previous patches and add new ones.
Would it suffice for you if there was an axes method clear_patches
that simply removed all the previous patches you instantiated? The
reason I ask is because it is not good practice to write scripts
around private attributes which may disappear in a month.
JDH
|
|
From: John H. <jdh...@ac...> - 2004-05-26 15:56:54
|
>>>>> "Jared" == Jared Wahlstrand <wah...@um...> writes:
Jared> Hi, I wanted to be able to use Inkscape to fiddle with the
Jared> details of my plot before exporting it to postscript, so I
Jared> started writing an SVG backend. What I have so far is
Jared> attached. Note that it's based on matplotlib-0.53.1, so it
Jared> won't work with 0.54 yet. So far it just draws lines,
Jared> rectangles, polygons, and text (only in helvetica).
Jared> Before I go further, I wanted to make sure you or someone
Jared> else is not already working on this. If not, I'll port it
Jared> to use font-caching, the new transform stuff and figure out
Jared> how to draw arcs and polygon collections, etc.
This is absolutely great news! Glad to hear you made it so far on
your own. I CCd the devel list, which you may want to join, in case
anyone else has any advice for you. As far as I know, noone else is
working on this.
Here are a few thoughts for you when porting to 0.54.
All the text layout has been moved to the text.Text front end. So you
no longer need to worry about horizontal alignment and the like,
compute_offsets is no longer needed, etc.. You also do not need to
provide the window extent of text anymore. Just provide
get_text_width_height(self, s, prop, ismath)
where s is a string and prop is a FontProperties instance. This
returns the width and height of the *unrotated* string. In the front
end I use this to compute the width and height of the rotated string,
compute the alignment offsets, and pass the x,y location to you to
draw the rotated string in draw_text. Instead of working with Text
instances, as in 0.53, you now work with strings and font properties.
The other new Renderer method is
get_canvas_width_height
As for polygon collections, you can implement this if you want, but
the base class provides an implementation that is reasonably fast
(approx 5x faster than the prior method of using separate polygon
instances). This may be good enough, since my guess is for most cases
you only demand the highest performance for interactive use, eg with
one of the GUI backends. So the *Agg backends implement this in
extension code.
As for draw_arc, currently this is only used for drawing circles, so
if you implemented draw_circle there is would suffice.
Jared> The fact that I, a python novice, could get so far in a day
Jared> attests to the awesomeness of matplotlib. Thanks!
A day... Amazing. Maybe we'll have you write the PDF backend next :-)
JDH
from __future__ import division
from cStringIO import StringIO
from matplotlib.afm import AFM
from matplotlib.backend_bases import RendererBase, GraphicsContextBase,\
FigureManagerBase, FigureCanvasBase
from matplotlib.cbook import iterable, is_string_like, flatten, enumerate,\
get_recursive_filelist, True, False
from matplotlib.figure import Figure
from matplotlib.font_manager import fontManager
from matplotlib.ft2font import FT2Font
from matplotlib._matlab_helpers import Gcf
from matplotlib.text import Text
from matplotlib.transforms import Bound1D, Bound2D, Transform
from matplotlib import rcParams
from matplotlib.numerix import fromstring, UInt8, Float32
import binascii
import sys,os
def error_msg_svg(msg, *args):
print >>sys.stderr, 'Error:', msg
sys.exit()
def _nums_to_str(seq, fmt='%1.3f'):
return ' '.join([_int_or_float(val, fmt) for val in seq])
def draw_if_interactive():
pass
def show():
"""
Show all the figures and enter the gtk mainloop
This should be the last line of your script
"""
for manager in Gcf.get_all_fig_managers():
manager.figure.realize()
def new_figure_manager(num, *args):
thisFig = Figure(*args)
canvas = FigureCanvasSVG(thisFig)
manager = FigureManagerSVG(canvas, num)
return manager
def _rgb_to_hex(rgb):
rgbhex='#'
for c in rgb:
h=hex(int(c*255))[2:]
if len(h) < 2:
h='0'+ h
rgbhex += h
return rgbhex
class RendererSVG(RendererBase):
def __init__(self, svgwriter,width,height):
self._svgwriter = svgwriter
self.width=width
self.height=height
def flipy(self):
'return true if y small numbers are top for renderer'
return False
def draw_rawsvg(self, svg):
self._svgwriter.write(svg)
def compute_text_offsets(self, t):
"""
Return the (x,y) offsets to adjust for the alignment
specifications
"""
prop = t.get_font_properties()
font = AFM(file(fontManager.findfont(prop, fontext='afm')))
text = t.get_text()
l,b,w,h = font.get_str_bbox(text)
fontsize = prop.get_size_in_points()
w *= 0.001*fontsize
h *= 0.001*fontsize
halign = t.get_horizontalalignment()
valign = t.get_verticalalignment()
if t.get_rotation()=='vertical':
w, h = h, w
if halign=='center': offsetx = w/2
elif halign=='right': offsetx = 0
else: offsetx = w
if valign=='center': offsety = h/2
elif valign=='top': offsety = h
else: offsety = 0
else:
if halign=='center': offsetx = -w/2
elif halign=='right': offsetx = -w
else: offsetx = 0
if valign=='center': offsety = h/2
elif valign=='top': offsety = h
else: offsety = 0
return (offsetx, offsety)
def draw_arc(self, gc, rgbFace, x, y, width, height, angle1, angle2):
pass
def draw_line(self, gc, x1, y1, x2, y2):
"""
Draw a single line from x1,y1 to x2,y2
"""
type = '<path '
details = ' d=\"M %f,%f L %f,%f\" ' % (x1,self.height-y1,x2,self.height-y2)
self._draw_svg(type, details, gc, None)
def draw_lines(self, gc, x, y):
"""
x and y are equal length arrays, draw lines connecting each
point in x, y
"""
if len(x)==0: return
if len(x)!=len(y): error_msg_svg('x and y must be the same length')
type = '<path '
details =' d=\"M %f,%f ' % (x[0], self.height-y[0])
for tup in zip(x[1:], self.height-y[1:]):
details += 'L %f,%f ' % tup
details += '\" '
self._draw_svg(type, details, gc, None)
def draw_rectangle(self, gc, rgbFace, x, y, width, height):
rgbhex='fill:#'
for c in rgbFace:
rgbhex += hex(int(c*255))[2:]
type = '<rect '
details = """
width=\"%f\"
height=\"%f\"
x=\"%f\"
y=\"%f\" """ % (width, height, x, self.height-y-height)
self._draw_svg(type, details, gc, rgbFace)
def draw_polygon(self, gc, rgbFace, points):
type = '<polygon '
details = 'points =\"'
for point in points:
details += '%f,%f ' % (point[0],self.height-point[1])
details += '\"'
self._draw_svg(type, details, gc, rgbFace)
def draw_text(self, gc, x, y, t):
"""
draw a Text instance
"""
prop = t.get_font_properties()
font = AFM(file(fontManager.findfont(prop, fontext='afm')))
text = t.get_text()
l,b,w,h = font.get_str_bbox(text)
if text=='': return
ox, oy = self.compute_text_offsets(t)
if t.get_rotation()=='vertical':
x = x+ox
y = self.height - y+oy-0.001*h
else:
x = x+ox
y = self.height - y+oy
thetext = '%s' % text
fontname = font.get_fontname()
fontsize = prop.get_size_in_points()
if t.get_rotation()=='vertical':
rotate = '90 rotate'
else:
rotate = ''
svg = '<text '
svg += """\
x=\"%f\"
y=\"%f\"
style=\"font-size:%f;stroke-width:1.0000000pt;font-family:helvetica;\" >
""" % (x,y,float(fontsize))
svg += thetext+' </text>'
self.draw_rawsvg(svg)
def get_svg(self):
return self._svgwriter.getvalue()
def finish(self):
self._svgwriter.write('</svg>')
def new_gc(self):
return GraphicsContextSVG()
def get_text_extent(self, t):
x, y = t.get_xy_display()
prop = t.get_font_properties()
font = AFM(file(fontManager.findfont(prop, fontext='afm')))
text = t.get_text()
l,b,w,h = font.get_str_bbox(text)
fontsize = prop.get_size_in_points()
l *= 0.001*fontsize
b *= 0.001*fontsize
w *= 0.001*fontsize
h *= 0.001*fontsize
ox, oy = self.compute_text_offsets(t)
left = x+ox+l
bottom = y-oy+b
if t.get_rotation()=='vertical':
w,h = h,w
return Bound2D(left, bottom, w, h)
def _draw_svg(self, type, details, gc, rgbFace):
svg=type
if rgbFace is not None:
rgbhex='fill:#'
for c in rgbFace:
rgbhex += hex(int(c*255))[2:]
rgbhex += ';'
else:
rgbhex='fill:none;'
style = self._get_gc_props_svg(gc)
svg+=style+rgbhex+ ' \"\n'
svg += details
svg += ' />\n'
self._svgwriter.write(svg)
def _get_gc_props_svg(self, gc):
color='stroke:'+_rgb_to_hex(gc.get_rgb())+';'
linewidth = 'stroke-width:'+repr(gc.get_linewidth())+'pt;'
join = 'stroke-linejoin:'+gc.get_joinstyle()+';'
cap = 'stroke-linecap:'+gc.get_capstyle()+';'
offset, seq = gc.get_dashes()
if seq is not None:
dashes = 'stroke-dasharray:'
for s in seq:
dashes += '%d ' % s
dashes += ';'
dashes += 'stroke-dashoffset:%f;' % offset
else:
dashes = ''
style = 'style=\"'+color+linewidth+join+cap+dashes
return style
class GraphicsContextSVG(GraphicsContextBase):
def set_linestyle(self, style):
GraphicsContextBase.set_linestyle(self, style)
offset, dashes = self._dashd[style]
self.set_dashes(offset, dashes)
class FigureCanvasSVG(FigureCanvasBase):
def draw(self):
pass
def print_figure(self, filename, dpi=100,
facecolor='w', edgecolor='w',
orientation='portrait'):
basename, ext = os.path.splitext(filename)
if not len(ext): filename += '.svg'
self._svgwriter = StringIO()
renderer = RendererSVG(self._svgwriter,self.figure.figsize[0]*dpi,self.figure.figsize[1]*dpi)
print dpi
print (self.figure.figsize[0]*dpi,
self.figure.figsize[1]*dpi)
self._svgwriter.write(_svgProlog % (renderer.width,renderer.height))
self.figure.draw(renderer)
renderer.finish()
try: fh = file(filename, 'w')
except IOError:
error_msg_svg('Could not open %s for writing' % filename)
return
print >>fh, renderer.get_svg()
class FigureManagerSVG(FigureManagerBase):
pass
FigureManager = FigureManagerSVG
error_msg = error_msg_svg
_svgProlog = """<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\"
\"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">
<!-- Created with matplotlib (http://matplotlib.sourceforge.net/) -->
<svg
xmlns=\"http://www.w3.org/2000/svg\"
xmlns:xlink=\"http://www.w3.org/1999/xlink\"
version=\"1.0\"
x=\"0.0000000\"
y=\"0.0000000\"
width=\"%f\"
height=\"%f\"
id=\"svg1\">
"""
|
|
From: Leon B. <leo...@ne...> - 2004-05-26 08:22:04
|
Thanks for your reply, Problem solved! I am now deleting all '_patches'-data beyond my viewing window's time frame which is set to 60 seconds. I call: if len(ax._patches) > (60*10): del ax._patches[:10] I have noticed that there are 10 entries made to the 'patches'-data for every bargraph I add. Can you explain this - and/or possibly direct me to a page to read up more about "_patches". Thanks for everything Leon On Tue, 25 May 2004 10:29:41 -0500, John Hunter <jdh...@ac...> wrote: >>>>>> "Leon" == Leon Brits <leo...@ne...> writes: > > Leon> Does this help? Should I tell the axes to "not remember" > Leon> the out-of-view data? > > Yes, this appears to be your problem. Normally, I would adivse you to > update the data of your bar elements (patches.Rectangle instances). > This would avoid the overhead of creating all the extra objects. But > for stacked bar graphs this may be more hassle than it's worth. > > But you definitely do need to clear the old instances before adding > the new ones. There are two ways to do this > > ax.cla() # clear all the axes elements > > This might introduce flicker in to your graph so you'll have to test > it. A hack is to simply clear all the patch instances from the axes. > If you are not using other patch building plot commands (eg hist, > scatter, bar) this should work fine and be the fastest solution > > ax._patches = [] > > It might be worthwhile to add a more limited clear function to the > axes. cla clears everything, but in some cases (like this one) you > might just want clear the lines, or the patches, or the text. > > If you are following matplotlib-users, I just did some profiling of > animated graphs and found that text operations were eating up about > 50% of the CPU time on animated graphs. The good news is that the > vast majority of this time can be reclaimed with some fairly easy > optimizations. > > JDH |
|
From: John H. <jdh...@ac...> - 2004-05-25 15:52:03
|
>>>>> "Leon" == Leon Brits <leo...@ne...> writes:
Leon> Does this help? Should I tell the axes to "not remember"
Leon> the out-of-view data?
Yes, this appears to be your problem. Normally, I would adivse you to
update the data of your bar elements (patches.Rectangle instances).
This would avoid the overhead of creating all the extra objects. But
for stacked bar graphs this may be more hassle than it's worth.
But you definitely do need to clear the old instances before adding
the new ones. There are two ways to do this
ax.cla() # clear all the axes elements
This might introduce flicker in to your graph so you'll have to test
it. A hack is to simply clear all the patch instances from the axes.
If you are not using other patch building plot commands (eg hist,
scatter, bar) this should work fine and be the fastest solution
ax._patches = []
It might be worthwhile to add a more limited clear function to the
axes. cla clears everything, but in some cases (like this one) you
might just want clear the lines, or the patches, or the text.
If you are following matplotlib-users, I just did some profiling of
animated graphs and found that text operations were eating up about
50% of the CPU time on animated graphs. The good news is that the
vast majority of this time can be reclaimed with some fairly easy
optimizations.
JDH
|
|
From: Leon B. <leo...@ne...> - 2004-05-25 15:40:17
|
On Tue, 25 May 2004 08:38:40 -0500, John Hunter
<jdh...@ac...> wrote:
>>>>>> "Leon" == Leon Brits <leo...@ne...> writes:
>
> Leon> Hi, I experience a slowdown in the command canvas.draw(). I
> Leon> am drawing a moving bargraph by shifting the x-axis and
> Leon> adding a new bar. The new bargraph is added every second,
> Leon> but starts to slows down after 5 minutes.
>
> Leon> I monitored the time it takes to execute the canvas.draw()
> Leon> command and this increases from 200ms to over 1 second
> Leon> within the 5 minutes and therfore the delay since I am
> Leon> trying to display the new bar every second.
>
> Leon> Any help appreciated! Thnaks Leon
>
> Could you post your code, or at least the core of it that does the
> drawing update?
>
> JDH
I cannot give you everything, but here is the main part....
g_canvas = get_current_fig_manager().canvas
< SNIP >
# Build stacked bargraph
for jin range(data[....])
# Select axes to add BAR too...
axes(g_display[j]['axes']['handle'])
b = bar(delta_time, h, 1, g_display[j]['offset'], color)
g_display[j]['offset'] += h # build stacked bar
# setup legend names & colors
g_display[j]['bars'].append(b)
g_display[j]['legend'].append(data['legend'])
< SNIP >
# Select axes to update...
axes(g_display[j]['axes']['handle'])
g_display[j]['maxy'] = Search_YMax(g_display[j]['maxy'],
g_display[j]['offset'])
g_display[j]['y-scale'] = Scale_YMax(g_display[j]['maxy'][0])
g_display[j]['axes']['handle'].set_ylim([0, g_display[j]['y-scale']])
g_display[j]['axes']['handle'].set_xlim([x_start, x_end])
legend(g_display[j]['bars'], g_display[j]['legend'], 'lower left')
ylabel(g_display[j]['unit'], g_font['unit'])
g_canvas.draw()
Does this help?
Should I tell the axes to "not remember" the out-of-view data?
Thanks for your quick reply!
Cheers
Leon
--
==============================
Leon J. Brits
Netronome Systems (Pty) Ltd.
Tel:+27(0)12-6673650
Fax:+27(0)12-6673635
|
|
From: John H. <jdh...@ac...> - 2004-05-25 14:01:01
|
>>>>> "Leon" == Leon Brits <leo...@ne...> writes:
Leon> Hi, I experience a slowdown in the command canvas.draw(). I
Leon> am drawing a moving bargraph by shifting the x-axis and
Leon> adding a new bar. The new bargraph is added every second,
Leon> but starts to slows down after 5 minutes.
Leon> I monitored the time it takes to execute the canvas.draw()
Leon> command and this increases from 200ms to over 1 second
Leon> within the 5 minutes and therfore the delay since I am
Leon> trying to display the new bar every second.
Leon> Any help appreciated! Thnaks Leon
Could you post your code, or at least the core of it that does the
drawing update?
JDH
|
|
From: Leon B. <leo...@ne...> - 2004-05-25 11:37:12
|
Hi, I experience a slowdown in the command canvas.draw(). I am drawing a moving bargraph by shifting the x-axis and adding a new bar. The new bargraph is added every second, but starts to slows down after 5 minutes. I monitored the time it takes to execute the canvas.draw() command and this increases from 200ms to over 1 second within the 5 minutes and therfore the delay since I am trying to display the new bar every second. Any help appreciated! Thnaks Leon # Using GTK tyd = time.time() g_canvas.draw() print "canvas time =",time.time()-tyd |
|
From: <ben...@id...> - 2004-05-25 09:00:32
|
Dear Open Source developer I am doing a research project on "Fun and Software Development" in which I kindly invite you to participate. You will find the online survey under http://fasd.ethz.ch/qsf/. The questionnaire consists of 53 questions and you will need about 15 minutes to complete it. With the FASD project (Fun and Software Development) we want to define the motivational significance of fun when software developers decide to engage in Open Source projects. What is special about our research project is that a similar survey is planned with software developers in commercial firms. This procedure allows the immediate comparison between the involved individuals and the conditions of production of these two development models. Thus we hope to obtain substantial new insights to the phenomenon of Open Source Development. With many thanks for your participation, Benno Luthiger PS: The results of the survey will be published under http://www.isu.unizh.ch/fuehrung/blprojects/FASD/. We have set up the mailing list fa...@we... for this study. Please see http://fasd.ethz.ch/qsf/mailinglist_en.html for registration to this mailing list. _______________________________________________________________________ Benno Luthiger Swiss Federal Institute of Technology Zurich 8092 Zurich Mail: benno.luthiger(at)id.ethz.ch _______________________________________________________________________ |
|
From: Andrew S. <as...@ca...> - 2004-05-21 19:06:50
|
I'm having trouble building matplotlib CVS HEAD using Windows XP, and
Python 2.2.1, Microsoft .NET 2003 Professional cl.exe:
I just checked out numarray CVS Head ('0.9.1', but I'm on the anonymous
pserver, so there may be a several-day lag), built that, removed the old
version from C:\Python22, and installed the new verison.
I also have Numeric 21.0 installed from the bdist_wininst installer.
Compiliing matplotlib (fresh from CVS) with either numarray or Numeric
specified in setup.py, I get: This seems like a (simple?) C++ issue in
_transforms.cpp. I try to avoid C++ myself, so hopefully this error
report will be enought for someone else to solve it...
running build_ext
building 'matplotlib._transforms' extension
_transforms.cpp
c:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BIN\cl.exe /c
/nologo /Ox /MD /W3 /GX -Isrc -I. -IC:\Python22\include
/Tpsrc/_transforms.cpp 1/Fobuild\temp.win32-2.2\Release\_transforms.obj
-DNUMARRAY
CXX\Objects.hxx(1128) : error C2039: 'random_access_iterator' : is not a
member of 'std'
CXX\Objects.hxx(1128) : see reference to class template
instantiation 'Py::SeqBase<T>::iterator' being compiled
CXX\Objects.hxx(1390) : see reference to class template
instantiation 'Py::SeqBase<T>' being compiled
CXX\Objects.hxx(1128) : error C2504: 'random_access_iterator' : base
class undefined
CXX\Objects.hxx(1128) : error C2143: syntax error : missing ',' before '<'
CXX\Objects.hxx(1264) : error C2039: 'random_access_iterator' : is not a
member of 'std'
CXX\Objects.hxx(1264) : see reference to class template
instantiation 'Py::SeqBase<T>::const_iterator' being compiled
CXX\Objects.hxx(1264) : error C2504: 'random_access_iterator' : base
class undefined
CXX\Objects.hxx(1264) : error C2143: syntax error : missing ',' before '<'
CXX\Objects.hxx(1128) : error C2039: 'random_access_iterator' : is not a
member of 'std'
CXX\Objects.hxx(2162) : see reference to class template
instantiation 'Py::SeqBase<T>::iterator' being compiled
with
[
T=Py::Object
]
CXX\Objects.hxx(2149) : see reference to class template
instantiation 'Py::MapBase<T>::iterator' being compiled
CXX\Objects.hxx(2330) : see reference to class template
instantiation 'Py::MapBase<T>' being compiled
CXX\Objects.hxx(1128) : error C2504: 'random_access_iterator' : base
class undefined
CXX\Objects.hxx(1128) : error C2143: syntax error : missing ',' before '<'
src\_transforms.cpp(110) : error C2039: 'numeric_limits' : is not a
member of 'std'
src\_transforms.cpp(110) : error C2065: 'numeric_limits' : undeclared
identifier
src\_transforms.cpp(110) : error C2062: type 'double' unexpected
src\_transforms.cpp(111) : error C2039: 'numeric_limits' : is not a
member of 'std'
src\_transforms.cpp(111) : error C2062: type 'double' unexpected
src\_transforms.cpp(111) : error C3861: 'numeric_limits': identifier not
found, even with argument-dependent lookup
src\_transforms.cpp(280) : error C2039: 'numeric_limits' : is not a
member of 'std'
src\_transforms.cpp(280) : error C2062: type 'double' unexpected
src\_transforms.cpp(281) : error C2039: 'numeric_limits' : is not a
member of 'std'
src\_transforms.cpp(281) : error C2062: type 'double' unexpected
src\_transforms.cpp(282) : error C2039: 'numeric_limits' : is not a
member of 'std'
src\_transforms.cpp(282) : error C2062: type 'double' unexpected
src\_transforms.cpp(283) : error C2039: 'numeric_limits' : is not a
member of 'std'
src\_transforms.cpp(283) : error C2062: type 'double' unexpected
src\_transforms.cpp(280) : error C3861: 'numeric_limits': identifier not
found, even with argument-dependent lookup
src\_transforms.cpp(281) : error C3861: 'numeric_limits': identifier not
found, even with argument-dependent lookup
src\_transforms.cpp(282) : error C3861: 'numeric_limits': identifier not
found, even with argument-dependent lookup
src\_transforms.cpp(283) : error C3861: 'numeric_limits': identifier not
found, even with argument-dependent lookup
creating build\temp.win32-2.2
creating build\temp.win32-2.2\Release
error: command 'cl.exe' failed with exit status 2
|
|
From: Andrew S. <str...@as...> - 2004-05-20 21:59:38
|
Hi,
Old versions of Numeric (specifically, version 21) don't have symbols
such at UInt8 defined. I modified nc_imports to deal with this case,
but I wanted to fly it past the experts in case it misses some subtle
intricacy.
Furthermore, I get the following bug when trying to run
examples/simple_plot.py on Windows XP, matplotlib 0.54, Numeric 21. Is
this fixable?
Traceback (most recent call last):
File "simple_plot.py", line 16, in ?
show()
File
"C:\Python22\Lib\site-packages\matplotlib\backends\backend_wx.py", line
1124, in show
figwin.canvas.draw()
File
"C:\Python22\Lib\site-packages\matplotlib\backends\backend_wxagg.py",
line 50, in draw
agg.draw()
File
"C:\Python22\Lib\site-packages\matplotlib\backends\backend_agg.py", line
299, in draw
self.figure.draw(self.renderer)
File "C:\Python22\Lib\site-packages\matplotlib\figure.py", line 128,
in draw
for a in self.axes: a.draw(renderer)
File "C:\Python22\Lib\site-packages\matplotlib\axes.py", line 603, in draw
self.xaxis.draw(renderer)
File "C:\Python22\Lib\site-packages\matplotlib\axis.py", line 463, in draw
tick.draw(renderer)
File "C:\Python22\Lib\site-packages\matplotlib\axis.py", line 130, in draw
if self.label1On: self.label1.draw(renderer)
File "C:\Python22\Lib\site-packages\matplotlib\text.py", line 193, in draw
bbox, info = self._get_layout(renderer)
File "C:\Python22\Lib\site-packages\matplotlib\text.py", line 129, in
_get_layout
txs = [float(v[0][0]) for v in cornersRotated]
File "C:\Python22\Lib\site-packages\Numeric\UserArray.py", line 154,
in __float__
def __float__(self): return self._scalarfunc(float)
File "C:\Python22\Lib\site-packages\Numeric\UserArray.py", line 151,
in _scalarfunc
raise TypeError, "only rank-0 arrays can be converted to Python
scalars."
TypeError: only rank-0 arrays can be converted to Python scalars.
|
|
From: Todd M. <jm...@st...> - 2004-05-18 09:40:33
|
On Mon, 2004-05-17 at 18:48, John Hunter wrote: > >>>>> "Perry" == Perry Greenfield <pe...@st...> writes: > > Perry> I keep forgetting that unless the clf() is done, that all > Perry> the previous data elements are still present. And thus the > Perry> error will repeat. (Waiting for that feature to allow > Perry> autoclearing in interactive mode I guess) > > I added a hold command and axes.hold property to matplotlibrc. In > CVS. > > Next release is due out in a day or two (a couple of small bugs to > squash). If any of you can test CVS that would be great - there have > been a lot of changes since 0.53 that touch virtually every part of > matplotlib (see the CHANGELOG in the sdist). Here is a snapshot if > you don't have ready CVS access > http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-0.54c.tar.gz > - sorry no win32 snapshots at the ready. > > Todd, do you still want to build a numarray version? If so, I'll send > you an sdist that I use to build my system and you can build for > numarray and send me back the exe. Yes. Please send me the sdist. Todd |
|
From: John H. <jdh...@ac...> - 2004-05-17 23:11:20
|
>>>>> "Perry" == Perry Greenfield <pe...@st...> writes:
Perry> I keep forgetting that unless the clf() is done, that all
Perry> the previous data elements are still present. And thus the
Perry> error will repeat. (Waiting for that feature to allow
Perry> autoclearing in interactive mode I guess)
I added a hold command and axes.hold property to matplotlibrc. In
CVS.
Next release is due out in a day or two (a couple of small bugs to
squash). If any of you can test CVS that would be great - there have
been a lot of changes since 0.53 that touch virtually every part of
matplotlib (see the CHANGELOG in the sdist). Here is a snapshot if
you don't have ready CVS access
http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-0.54c.tar.gz
- sorry no win32 snapshots at the ready.
Todd, do you still want to build a numarray version? If so, I'll send
you an sdist that I use to build my system and you can build for
numarray and send me back the exe.
JDH
|