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
(10) |
2
(6) |
3
(13) |
4
(3) |
5
(10) |
6
(4) |
|
7
(2) |
8
(15) |
9
(10) |
10
(44) |
11
(17) |
12
(9) |
13
(2) |
|
14
(2) |
15
(4) |
16
(8) |
17
(13) |
18
(11) |
19
(12) |
20
|
|
21
|
22
(10) |
23
(10) |
24
(11) |
25
(11) |
26
(9) |
27
(1) |
|
28
|
29
(15) |
30
(14) |
31
(7) |
|
|
|
|
From: Les S. <sch...@op...> - 2005-08-17 17:34:43
|
John Hunter wrote:
> Try installing the latest release (0.83.2),
> removing your ~/.matplotlib/tex.cache, and rerunning your script.
i still get the problem:
<<<<<<<<<<<<
root@tma-1:~/install/matplotlib-0.83.2/examples# rm -rf
/root/.matplotlib/tex.cache
root@tma-1:~/install/matplotlib-0.83.2/examples# python2.4 tex_demo.py
Traceback (most recent call last):
File "tex_demo.py", line 31, in ?
savefig('tex_demo.ps')
File "/usr/lib/python2.4/site-packages/pylab.py", line 773, in savefig
File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
636, in savefig
self.canvas.print_figure(*args, **kwargs)
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py",
line 179, in print_figure
agg.print_figure(filename, dpi, facecolor, edgecolor, orientation)
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 444, in print_figure
self.draw()
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 381, in draw
self.figure.draw(renderer)
File "/usr/lib/python2.4/site-packages/matplotlib/figure.py", line
511, in draw
for a in self.axes: a.draw(renderer)
File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 1387,
in draw
self.xaxis.draw(renderer)
File "/usr/lib/python2.4/site-packages/matplotlib/axis.py", line 552,
in draw
tick.draw(renderer)
File "/usr/lib/python2.4/site-packages/matplotlib/axis.py", line 151,
in draw
if self.label1On: self.label1.draw(renderer)
File "/usr/lib/python2.4/site-packages/matplotlib/text.py", line 848,
in draw
self._mytext.draw(renderer)
File "/usr/lib/python2.4/site-packages/matplotlib/text.py", line 335,
in draw
bbox, info = self._get_layout(renderer)
File "/usr/lib/python2.4/site-packages/matplotlib/text.py", line 184,
in _get_layout
w,h = renderer.get_text_width_height(
File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py",
line 241, in get_text_width_height
Z = self.texmanager.get_rgba(s, size, dpi, rgb)
File "/usr/lib/python2.4/site-packages/matplotlib/texmanager.py", line
296, in get_rgba
X = readpng(pngfile)
RuntimeError: _image_module::readpng could not open PNG file
/root/.matplotlib/tex.cache/30565a8911a6bb487e3745c0ea3c8224_120.png for
reading
root@tma-1:~/install/matplotlib-0.83.2/examples# ls -l
/root/.matplotlib/tex.cache/
total 8
-rw-r--r-- 1 root root 204 Aug 17 12:51
30565a8911a6bb487e3745c0ea3c8224.dvi
-rw-r--r-- 1 root root 160 Aug 17 12:51
30565a8911a6bb487e3745c0ea3c8224.tex
>>>>>>>>>>
the problem -- on the surface -- appears to be that readpng is looking
for an existing file, but with _120 prepended to the . extension.
les schaffer
|
|
From: <cgl...@lk...> - 2005-08-17 16:03:10
|
John, It appears that the conflict , configuration problem is in my Eclipse IDE or it's pydev plugin I use for development. I have now been able to run the code from a DOS prompt, and after installing the newest Eclipse3.1 version and pydev plugin the Agg backends now function normally for savefig() . Thanks again! C S G ----- Forwarded by Charles S. Glackin/PA/DOMESTIC/BNY on 08/17/2005 11:45 AM ----- |---------+----------------------------> | | Charles S. | | | Glackin | | | | | | 08/17/2005 10:09 | | | AM | | | | |---------+----------------------------> >-------------------------------------------------------------------------------------------------------------| | | | To: John Hunter <jdh...@ac...> | | cc: mat...@li... | | Subject: Re: [Matplotlib-users] Agg backend errors(Document link: Charles S. Glackin) | >-------------------------------------------------------------------------------------------------------------| John, As you said I also believe it is likley to be a configuration/conflict error. I recieve the same error below any time I attempt to use savefig() with an Agg backend. The script below is an example file to show it happens on even the most simple code. I was wondering if any one had seen this , or could give me an idea of where to look for removing the conflict. Are there file dependencies I should be looking at , outside of Matplotlib? Thanks again! C S G |---------+-------------------------------> | | John Hunter | | | <jdh...@ac...| | | hicago.edu> | | | | | | 08/17/2005 09:58 AM | | | | |---------+-------------------------------> >--------------------------------------------------------------------------------------------------------------| | | | To: cgl...@lk... | | cc: mat...@li... | | Subject: Re: [Matplotlib-users] Agg backend errors | >--------------------------------------------------------------------------------------------------------------| >>>>> "cglackin" == cglackin <cgl...@lk...> writes: cglackin> John, Thank you for the reply! cglackin> It does not seem to matter if I use .png or leave off cglackin> the extension (as I really should have). I have cglackin> uninstalled , and reinstalled Matplotlib, and Numeric. cglackin> And in a final check even reinstalled Python. Same cglackin> errors. I can see the agg backends are in the default cglackin> directories , and the paths seem to allow access to cglackin> them, the errors seem to happen during rendering or cglackin> saving. I tried to replicate this problem and could not. I did a clean install of 0.83.2 on windows XP for python23 and Numeric 23.7 and your test script ran fine for me. That makes it harder to fix. I reread your original post and you are getting the error File "C:\Python23\Lib\site-packages\matplotlib\agg.py", line 809, in move_to def move_to(*args): return _agg.path_storage_move_to(*args) TypeError: argument number 1: a 'path_t *' is expected, 'path_storagePtr(<agg.path_storagePtr; proxy of C++ agg::path_storage instance at _208aa401_p_agg__path_storage>)' is received Is this the one you are still getting? For some reason it appears that the SWIG typedef 'path_t' for 'agg::path_storage' is not being properly handled on your system. Can you provide any more information (exact operating system, other things you've installed, any nonstandard path settings, etc). I assume the script you posted is the one you are working with, and you are not importing anything except pylab. Here is what I am testing with from pylab import * plot(arange(10), color='#006400') xlabel('this is a xlabel\n(with newlines!)') ylabel('this is vertical\ntest', multialignment='center') #ylabel('this is another!') text(2, 7,'this is\nyet another test', rotation=45, horizontalalignment = 'center', verticalalignment = 'top', multialignment = 'center') savefig('multiline') which I run with C:> c:\Python23\python myscript.py -dAgg --verbose-helpful JDH ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please call the help desk at ext 4850 ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
|
From: John H. <jdh...@ac...> - 2005-08-17 15:50:09
|
>>>>> "Eric" == Eric Emsellem <ems...@ob...> writes:
Eric> just for testing, note that there is a syntax problem in the
Eric> line I sent (in laby=... one " is missing) .
Neat example. I cleaned it up to make more efficient and to solve
the flicker problems. In this version, all of the artists are created
once in the init function and then their data is updated on move.
This is much more efficient.
I also refactored the code to be independent of pylab and to make
Scatter3D inherit from matplotlib Axes, since since you do your own
tick lines etc. With a little work, this approach has potential for
simple 3D plots.
Thanks! I'll look over this more later.
import pylab as p
import matplotlib.numerix as nx
from matplotlib.axes import Axes
class Scatter3D(Axes):
def __init__(self, fig, rect, x, y, z,
theta=45., phi=140., labx="x", laby="y", labz="z", **kwargs):
Axes.__init__(self, fig, rect,
frameon=False, xticks=[], yticks=[], **kwargs)
self.x = x
self.y = y
self.z = z
self.labx = labx
self.laby = laby
self.labz = labz
self.theta = theta
self.phi = phi
self.startx = min(self.x)
self.starty = min(self.y)
self.startz = min(self.z)
self.endx = max(self.x)
self.endy = max(self.y)
self.endz = max(self.z)
self.rangex = self.endx - self.startx
self.rangey = self.endy - self.starty
self.rangez = self.endz - self.startz
self.axex = nx.array([1,0,0])
self.axey = nx.array([0,1,0])
self.axez = nx.array([0,0,1])
if self.rangex != 0. :
self.xn = (self.x - self.startx) / self.rangex
else :
self.xn = nx.zeros(shape(self.x), nx.Float)
if self.rangey != 0. :
self.yn = (self.y - self.starty) / self.rangey
else :
self.yn = nx.zeros(shape(self.y), nx.Float)
if self.rangez != 0. :
self.zn = (self.z - self.startz) / self.rangez
else :
self.zn = nx.zeros(shape(self.z), nx.Float)
self.w = self.figure.get_figwidth()
self.h = self.figure.get_figheight()
xp, yp, zp = self.projpoint(self.axex, self.axey, self.axez, theta=self.theta, phi=self.phi)
self.ax0line, = self.plot([0.,xp[0]],[0.,yp[0]])
self.ax1line, = self.plot([0.,xp[1]],[0.,yp[1]])
self.ax2line, = self.plot([0.,xp[2]],[0.,yp[2]])
self.eps = 0.02
eps = self.eps
self.labxt = self.text(xp[0]+eps,yp[0]+eps, self.labx)
self.labyt = self.text(xp[1]+eps,yp[1]+eps, self.laby)
self.labzt = self.text(xp[2]+eps,yp[2]+eps, self.labz)
self.endxt = self.text(xp[0],yp[0], str("%5.3f"%self.endx))
self.endyt = self.text(xp[1],yp[1], str("%5.3f"%self.endy))
self.endzt = self.text(xp[2],yp[2], str("%5.3f"%self.endz))
self.startxt = self.text(xp[0]/10.,yp[0]/10., str("%5.3f"%self.startx))
self.startyt = self.text(xp[1]/10.,yp[1]/10., str("%5.3f"%self.starty))
self.startzt = self.text(xp[2]/10.,yp[2]/10., str("%5.3f"%self.startz))
xpn, ypn, zpn = self.projpoint(self.xn, self.yn, self.zn, theta=self.theta, phi=self.phi)
self.collection = self.scatter(xpn, ypn)
self.figure.canvas.mpl_connect('motion_notify_event', self.on_move)
def plotxyz(self) :
xp, yp, zp = self.projpoint(self.axex, self.axey, self.axez, theta=self.theta, phi=self.phi)
self.ax0line.set_data([0.,xp[0]],[0.,yp[0]])
self.ax1line.set_data([0.,xp[1]],[0.,yp[1]])
self.ax2line.set_data([0.,xp[2]],[0.,yp[2]])
eps = self.eps
self.labxt.set_position((xp[0]+eps,yp[0]+eps))
self.labyt.set_position((xp[1]+eps,yp[1]+eps))
self.labzt.set_position((xp[2]+eps,yp[2]+eps))
self.endxt.set_position((xp[0],yp[0]))
self.endyt.set_position((xp[1],yp[1]))
self.endzt.set_position((xp[2],yp[2]))
self.startxt.set_position((xp[0]/10.,yp[0]/10.))
self.startyt.set_position((xp[1]/10.,yp[1]/10.))
self.startzt.set_position((xp[2]/10.,yp[2]/10.))
xpn, ypn, zpn = self.projpoint(self.xn, self.yn, self.zn, theta=self.theta, phi=self.phi)
# todo, expose the _offsets property "publicly"
self.collection._offsets = zip(xpn, ypn)
self.figure.canvas.draw()
return xpn, ypn, zpn
def on_move(self, event):
# get the x and y pixel coords
x, y = event.x, event.y
self.theta = x * 3.6 / self.w
self.phi = y * 3.6 / self.h
if event.inaxes == self:
self.plotxyz()
def rotaxe(self, x,y,rotangle=45.) :
rotangle = rotangle * nx.pi / 180.
xp = x * nx.cos(rotangle) + y * nx.sin(rotangle)
yp = - x * nx.sin(rotangle) + y * nx.cos(rotangle)
return xp, yp
def projpoint(self, x,y,z,theta=45.,phi=0.) :
xp, y1 = self.rotaxe(x,y,rotangle=phi)
yp, zp = self.rotaxe(y1,z,rotangle=theta)
return xp, yp, zp
from pylab import figure, show
fig = figure()
x,y,z = nx.mlab.rand(3,100)
ax = Scatter3D(fig, [0.1, 0.1, 0.8, 0.8],
x, y, z, labx="x", laby="y", labz="z")
fig.add_axes(ax)
show()
|
|
From: Darren D. <dd...@co...> - 2005-08-17 15:49:01
|
On Wednesday 17 August 2005 11:15 am, John Hunter wrote:
> >>>>> "Darren" == Darren Dale <dd...@co...> writes:
>
> Darren> line 727, in draw get_current_fig_manager().canvas.draw()
> Darren> File
> Darren>
> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
> Darren> line 234, in draw self._pixmap_prepare (w, h) File
> Darren>
> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
> Darren> line 291, in _pixmap_prepare self._pixmap_height)
> Darren> RuntimeError: could not create GdkPixmap object
>
> Try updating from CVS -- this is unlikely to be due to his script, but
> to some changes I made in the gtk backend and then fixed.
That did it.
That's a nice first stab at 3D scatter plots, Eric.
> any suggestion of how to improve the
> speed/efficiency, esthetic and functionality of such a routine?
I'll let the guru's speak to efficiency, but I have a suggestion for aesthetic
and functionality.
I have done quite a lot of 3D design in AutoCAD, and they have a very nice
"orbit" tool. They superimposed this compass thing over the drawing:
---O---
/ \
/ \
| |
O O
| |
\ /
\ /
---O---
When you press the mouse button down in the N or S pole and then drag it, it
rotates around the E-W axis. If you press the mouse button down outside of
the compass, it rotates around the axis pointing out of the screen. I forget
what it does when you press the button down inside the compass but not on a
pole.
I guess this is way out of scope at this point, but I thought I'd mention it.
Darren
|
|
From: Eric E. <ems...@ob...> - 2005-08-17 15:25:09
|
just for testing, note that there is a syntax problem in the line I sent (in laby=... one " is missing) . So you should use: x = array([0.,1.,2.,3.]) y = array([1.,0.,3.,2.]) z = array([4.,3.,0.,1.]) tmp = pxyz(x, y, z, labx="x", laby="y", labz="z") sorry for this. Eric -- =============================================================== Observatoire de Lyon ems...@ob... 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem =============================================================== |
|
From: John H. <jdh...@ac...> - 2005-08-17 15:16:52
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
Darren> line 727, in draw get_current_fig_manager().canvas.draw()
Darren> File
Darren> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
Darren> line 234, in draw self._pixmap_prepare (w, h) File
Darren> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
Darren> line 291, in _pixmap_prepare self._pixmap_height)
Darren> RuntimeError: could not create GdkPixmap object
Try updating from CVS -- this is unlikely to be due to his script, but
to some changes I made in the gtk backend and then fixed.
JDH
|
|
From: Darren D. <dd...@co...> - 2005-08-17 15:12:33
|
On Wednesday 17 August 2005 10:53 am, Eric Emsellem wrote:
> Hi,
>
> I needed to see visualize a set of points in 3D (scatter plot) and to be
> able to rotate the axes easily in a way similar to gnuplot.
> I have thus written a short python routine using matplotlib for the visu
> part (attached below).
Hi Eric,
Could you post a complete example? I tried to construct a script from what you
posted, and got the following:
(test.py:10899): Gdk-CRITICAL **: gdk_pixmap_new: assertion `(drawable !=
NULL) || (depth != -1)' failed
Traceback (most recent call last):
File "test.py", line 98, in ?
s = pxyz(x, y, z, labx="x", laby="y", labz="z")
File "test.py", line 55, in __init__
self.plotxyz()
File "test.py", line 81, in plotxyz
draw()
File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line 727, in
draw
get_current_fig_manager().canvas.draw()
File "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
line 234, in draw
self._pixmap_prepare (w, h)
File "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py",
line 291, in _pixmap_prepare
self._pixmap_height)
RuntimeError: could not create GdkPixmap object
|
|
From: Eric E. <ems...@ob...> - 2005-08-17 14:54:58
|
Hi,
I needed to see visualize a set of points in 3D (scatter plot) and to be
able to rotate the axes easily in a way similar to gnuplot.
I have thus written a short python routine using matplotlib for the visu
part (attached below).
It works simply by doing something like:
###########################################
x = array([0.,1.,2.,3.])
y = array([1.,0.,3.,2.])
z = array([4.,3.,0.,1.])
try = pxyz(x, y, z, labx="x", laby=y", labz="z")
###########################################
It does show the 4 points in projection, including the projection of the
x,y,z axis. And each time you move the mouse within the figure, it will
move the projection accordingly, showing the 3D scatter plots and the 3
unit axes again.
(the projection is defined via 2 rotation angles, theta - around x - and
phi - around z).
Now I realize this is really a naive way of doing such an exercise. The
updating (projecting, refreshing, and reploting all points everytime,
positions of the axis labels, etc) is very far from optimal (slow and
somewhat ugly) mostly because I am a beginner here. So I was wondering
if anyone on-line had produced a similar but somewhat refined version of
this, or if you had any suggestion of how to improve the
speed/efficiency, esthetic and functionality of such a routine? At the
moment I am plotting 48 points... But I can imagine such a routine could
just be unusable with 1000 points...
Any input is welcome!!!
Thanks,
Eric
====================================================================
def rotaxe(x,y,rotangle=45.) :
rotangle = rotangle * pi / 180.
xp = x * cos(rotangle) + y * sin(rotangle)
yp = - x * sin(rotangle) + y * cos(rotangle)
return xp, yp
def projpoint(x,y,z,theta=45.,phi=0.) :
xp, y1 = rotaxe(x,y,rotangle=phi)
yp, zp = rotaxe(y1,z,rotangle=theta)
return xp, yp, zp
class pxyz :
def __init__(self, x, y, z, theta=45., phi=140., labx="x", laby="y",
labz="z"):
self.x = x
self.y = y
self.z = z
self.labx = labx
self.laby = laby
self.labz = labz
self.theta = theta
self.phi = phi
self.startx = min(self.x)
self.starty = min(self.y)
self.startz = min(self.z)
self.endx = max(self.x)
self.endy = max(self.y)
self.endz = max(self.z)
self.rangex = self.endx - self.startx
self.rangey = self.endy - self.starty
self.rangez = self.endz - self.startz
self.axex = array([1,0,0])
self.axey = array([0,1,0])
self.axez = array([0,0,1])
if self.rangex != 0. :
self.xn = (self.x - self.startx) / self.rangex
else :
self.xn = zeros(shape(self.x), Float)
if self.rangey != 0. :
self.yn = (self.y - self.starty) / self.rangey
else :
self.yn = zeros(shape(self.y), Float)
if self.rangez != 0. :
self.zn = (self.z - self.startz) / self.rangez
else :
self.zn = zeros(shape(self.z), Float)
fig = gcf()
self.w = fig.get_figwidth()
self.h = fig.get_figheight()
self.plotxyz()
connect('motion_notify_event', self.on_move)
def plotxyz(self) :
clf()
ioff()
xp, yp, zp = projpoint(self.axex, self.axey, self.axez,
theta=self.theta, phi=self.phi)
plot([0.,xp[0]],[0.,yp[0]])
plot([0.,xp[1]],[0.,yp[1]])
plot([0.,xp[2]],[0.,yp[2]])
eps = 0.02
text(xp[0]+eps,yp[0]+eps, self.labx)
text(xp[1]+eps,yp[1]+eps, self.laby)
text(xp[2]+eps,yp[2]+eps, self.labz)
text(xp[0],yp[0], str("%5.3f"%self.endx))
text(xp[1],yp[1], str("%5.3f"%self.endy))
text(xp[2],yp[2], str("%5.3f"%self.endz))
text(xp[0]/10.,yp[0]/10., str("%5.3f"%self.startx))
text(xp[1]/10.,yp[1]/10., str("%5.3f"%self.starty))
text(xp[2]/10.,yp[2]/10., str("%5.3f"%self.startz))
xpn, ypn, zpn = projpoint(self.xn, self.yn, self.zn,
theta=self.theta, phi=self.phi)
scatter(xpn, ypn)
ion()
draw()
axis('off')
return xpn, ypn, zpn
def on_move(self, event):
# get the x and y pixel coords
x, y = event.x, event.y
self.theta = x * 3.6 / self.w
self.phi = y * 3.6 / self.h
if event.inaxes:
self.plotxyz()
--
===============================================================
Observatoire de Lyon ems...@ob...
9 av. Charles-Andre tel: +33 4 78 86 83 84
69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86
France http://www-obs.univ-lyon1.fr/eric.emsellem
===============================================================
|
|
From: <cgl...@lk...> - 2005-08-17 14:21:22
|
I=20am=20trying=20to=20create=20charts=20using=20the=20SVG=20backend.=20=20= I=20am=20able=20to=20create a=20chart=20but=20the=20size=20seems=20to=20be=20fixed=20in=20the=20upper=20= right,=20and=20the=20image does=20not=20resize=20to=20the=20browser=20window,=20as=20I=20would=20expe= ct=20it=20to.=20=20When=20I look=20at=20the=20SVG=20image=20code=20generated=20,=20I=20see=20the=20fir= st=20portion=20of=20the svg=20header=20=20as=201.=20below.=20=20=20=20If=20I=20adjust=20the=20head= er=20as=20in=202.=20=20with=20a viewBox=20=20setting=20I=20get=20an=20image=20that=20will=20scall=20to=20t= he=20browser=20window, and=20is=20centered.=20=20Is=20there=20a=20way=20to=20do=20this=20from=20w= ith=20in=20Matplotlib? 1. <svg =20=20=20xmlns=3D"http://www.w3.org/2000/svg" =20=20=20xmlns:xlink=3D"http://www.w3.org/1999/xlink" =20=20=20version=3D"1.0" =20=20=20x=3D"0.0" =20=20=20y=3D"0.0" =20=20=20width=3D"576" =20=20=20height=3D"432" =20=20=20id=3D"svg1"> 2.=20<svg =20=20=20xmlns=3D"http://www.w3.org/2000/svg" =20=20=20xmlns:xlink=3D"http://www.w3.org/1999/xlink" =20=20=20version=3D"1.0" =20=20=20viewBox=3D"0=200=20576=20432" =20=20=20id=3D"svg1"> C=20Scott=20Glackin Production=20Support=20Specialist=20/=20IT Lockwood=AE 10=20Valley=20Stream=20Parkway Malvern,=20PA=2019355 Phone:=20(610)-651-8810 Email:=20C...@lk... ______________________________________________________________________ This=20email=20has=20been=20scanned=20by=20the=20MessageLabs=20Email=20Sec= urity=20System. For=20more=20information=20please=20visit=20http://www.messagelabs.com/ema= il=20 ______________________________________________________________________ |
|
From: <cgl...@lk...> - 2005-08-17 14:09:54
|
John, As=20you=20said=20I=20also=20believe=20it=20is=20likley=20to=20be=20a=20=20= configuration/conflict error.=20=20I=20recieve=20the=20same=20error=20below=20any=20time=20I=20at= tempt=20to=20use savefig()=20with=20an=20Agg=20backend.=20=20The=20script=20below=20is=20an= =20example=20file=20to show=20it=20happens=20on=20even=20the=20most=20simple=20code.=20=20=20=20I= =20was=20wondering=20if=20any one=20had=20seen=20this=20,=20or=20could=20give=20me=20an=20idea=20of=20wh= ere=20to=20look=20for removing=20the=20conflict.=20=20Are=20there=20file=20dependencies=20I=20sh= ould=20be=20looking at=20,=20outside=20of=20Matplotlib? Thanks=20again! C=20Scott=20Glackin Production=20Support=20Specialist=20/=20IT Lockwood=AE 10=20Valley=20Stream=20Parkway Malvern,=20PA=2019355 Phone:=20(610)-651-8810 Email:=20C...@lk... |---------+-------------------------------> |=20=20=20=20=20=20=20=20=20|=20=20=20=20=20=20=20=20=20=20=20John=20Hunte= r=20=20=20=20=20=20=20=20=20| |=20=20=20=20=20=20=20=20=20|=20=20=20=20=20=20=20=20=20=20=20<jdhunter@ac= e.bsd.uc| |=20=20=20=20=20=20=20=20=20|=20=20=20=20=20=20=20=20=20=20=20hicago.edu>=20= =20=20=20=20=20=20=20=20| |=20=20=20=20=20=20=20=20=20|=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20| |=20=20=20=20=20=20=20=20=20|=20=20=20=20=20=20=20=20=20=20=2008/17/2005=20= 09:58=20AM=20| |=20=20=20=20=20=20=20=20=20|=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20| |---------+-------------------------------> =20=20>-------------------------------------------------------------------= -------------------------------------------| =20=20|=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20| =20=20|=20=20=20=20=20=20=20To:=20=...@lk...=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20| =20=20|=20=20=20=20=20=20=20cc:=20=20=20=20=20=20=20matplotlib-users@lists= .sourceforge.net=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20| =20=20|=20=20=20=20=20=20=20Subject:=20=20Re:=20[Matplotlib-users]=20Agg=20= backend=20errors=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20| =20=20>-------------------------------------------------------------------= -------------------------------------------| >>>>>=20"cglackin"=20=3D=3D=20cglackin=20=20<cgl...@lk...>=20writes: =20=20=20=20cglackin>=20John,=20Thank=20you=20for=20the=20reply! =20=20=20=20cglackin>=20It=20does=20not=20seem=20to=20matter=20if=20I=20us= e=20.png=20or=20leave=20off =20=20=20=20cglackin>=20the=20extension=20(as=20I=20really=20should=20have= ).=20=20I=20have =20=20=20=20cglackin>=20uninstalled=20,=20and=20reinstalled=20Matplotlib,=20= and=20Numeric. =20=20=20=20cglackin>=20And=20in=20a=20final=20check=20even=20reinstalled=20= Python.=20=20Same =20=20=20=20cglackin>=20errors.=20=20I=20can=20see=20the=20agg=20backends=20= are=20in=20the=20default =20=20=20=20cglackin>=20directories=20,=20and=20the=20paths=20seem=20to=20= allow=20access=20to =20=20=20=20cglackin>=20them,=20the=20errors=20seem=20to=20happen=20during= =20rendering=20or =20=20=20=20cglackin>=20saving. I=20tried=20to=20replicate=20this=20problem=20and=20could=20not.=20=20I=20= did=20a=20clean install=20of=200.83.2=20on=20windows=20XP=20for=20python23=20and=20Numeric= =2023.7=20and=20your test=20script=20ran=20fine=20for=20me.=20=20That=20makes=20it=20harder=20t= o=20fix. I=20reread=20your=20original=20post=20and=20you=20are=20getting=20the=20er= ror =20=20=20=20=20File=20"C:\Python23\Lib\site-packages\matplotlib\agg.py",=20= line=20809, =20=20=20in=20move_to =20=20=20=20=20=20=20def=20move_to(*args):=20return=20_agg.path_storage_mo= ve_to(*args) =20=20=20TypeError:=20argument=20number=201:=20a=20'path_t=20*'=20is=20exp= ected, =20=20=20'path_storagePtr(<agg.path_storagePtr;=20proxy=20of=20C++ =20=20=20agg::path_storage=20instance=20at=20_208aa401_p_agg__path_storage= >)'=20is =20=20=20received Is=20this=20the=20one=20you=20are=20still=20getting?=20=20For=20some=20rea= son=20it=20appears that=20the=20SWIG=20typedef=20'path_t'=20for=20'agg::path_storage'=20is=20= not=20being properly=20handled=20on=20your=20system. Can=20you=20provide=20any=20more=20information=20(exact=20operating=20syst= em,=20other things=20you've=20installed,=20any=20nonstandard=20path=20settings,=20etc)= .=20=20I assume=20the=20script=20you=20posted=20is=20the=20one=20you=20are=20workin= g=20with,=20and=20you are=20not=20importing=20anything=20except=20pylab. Here=20is=20what=20I=20am=20testing=20with from=20pylab=20import=20* plot(arange(10),=20color=3D'#006400') xlabel('this=20is=20a=20xlabel\n(with=20newlines!)') ylabel('this=20is=20vertical\ntest',=20multialignment=3D'center') #ylabel('this=20is=20another!') text(2,=207,'this=20is\nyet=20another=20test', =20=20=20=20rotation=3D45, =20=20=20=20horizontalalignment=20=3D=20'center', =20=20=20=20verticalalignment=20=20=20=3D=20'top', =20=20=20=20multialignment=20=20=20=20=20=20=3D=20'center') savefig('multiline') which=20I=20run=20with =20=20C:>=20c:\Python23\python=20myscript.py=20-dAgg=20--verbose-helpful JDH ______________________________________________________________________ This=20email=20has=20been=20scanned=20by=20the=20MessageLabs=20Email=20Sec= urity=20System. For=20more=20information=20please=20call=20the=20help=20desk=20at=20ext=20= 4850 ______________________________________________________________________ ______________________________________________________________________ This=20email=20has=20been=20scanned=20by=20the=20MessageLabs=20Email=20Sec= urity=20System. For=20more=20information=20please=20visit=20http://www.messagelabs.com/ema= il=20 ______________________________________________________________________ |
|
From: John H. <jdh...@ac...> - 2005-08-17 13:59:56
|
>>>>> "cglackin" == cglackin <cgl...@lk...> writes:
cglackin> John, Thank you for the reply!
cglackin> It does not seem to matter if I use .png or leave off
cglackin> the extension (as I really should have). I have
cglackin> uninstalled , and reinstalled Matplotlib, and Numeric.
cglackin> And in a final check even reinstalled Python. Same
cglackin> errors. I can see the agg backends are in the default
cglackin> directories , and the paths seem to allow access to
cglackin> them, the errors seem to happen during rendering or
cglackin> saving.
I tried to replicate this problem and could not. I did a clean
install of 0.83.2 on windows XP for python23 and Numeric 23.7 and your
test script ran fine for me. That makes it harder to fix.
I reread your original post and you are getting the error
File "C:\Python23\Lib\site-packages\matplotlib\agg.py", line 809,
in move_to
def move_to(*args): return _agg.path_storage_move_to(*args)
TypeError: argument number 1: a 'path_t *' is expected,
'path_storagePtr(<agg.path_storagePtr; proxy of C++
agg::path_storage instance at _208aa401_p_agg__path_storage>)' is
received
Is this the one you are still getting? For some reason it appears
that the SWIG typedef 'path_t' for 'agg::path_storage' is not being
properly handled on your system.
Can you provide any more information (exact operating system, other
things you've installed, any nonstandard path settings, etc). I
assume the script you posted is the one you are working with, and you
are not importing anything except pylab.
Here is what I am testing with
from pylab import *
plot(arange(10), color='#006400')
xlabel('this is a xlabel\n(with newlines!)')
ylabel('this is vertical\ntest', multialignment='center')
#ylabel('this is another!')
text(2, 7,'this is\nyet another test',
rotation=45,
horizontalalignment = 'center',
verticalalignment = 'top',
multialignment = 'center')
savefig('multiline')
which I run with
C:> c:\Python23\python myscript.py -dAgg --verbose-helpful
JDH
|
|
From: <cgl...@lk...> - 2005-08-17 11:19:45
|
John, Thank you for the reply! It does not seem to matter if I use .png or leave off the extension (as I really should have). I have uninstalled , and reinstalled Matplotlib, and Numeric. And in a final check even reinstalled Python. Same errors. I can see the agg backends are in the default directories , and the paths seem to allow access to them, the errors seem to happen during rendering or saving. C S G |---------+-------------------------------> | | John Hunter | | | <jdh...@ac...| | | hicago.edu> | | | | | | 08/16/2005 03:57 PM | | | | |---------+-------------------------------> >--------------------------------------------------------------------------------------------------------------| | | | To: cgl...@lk... | | cc: mat...@li... | | Subject: Re: [Matplotlib-users] Agg backend errors | >--------------------------------------------------------------------------------------------------------------| >>>>> "cglackin" == cglackin <cgl...@lk...> writes: cglackin> savefig('c:\multiline.jpg') native agg doesn't support jpg -- try png. JDH ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please call the help desk at ext 4850 ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |
|
From: David A. R. <dav...@ia...> - 2005-08-17 00:48:43
|
Hello, I want a plot with semilogy and with errorbars, is it possible? how? thanks, ciao. |