SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(36)
2
(10)
3
(8)
4
5
(4)
6
(15)
7
(17)
8
(3)
9
(8)
10
(5)
11
(2)
12
(5)
13
(5)
14
(15)
15
(3)
16
(10)
17
(6)
18
(2)
19
(1)
20
(11)
21
(33)
22
(13)
23
(14)
24
(15)
25
(4)
26
(5)
27
(9)
28
(12)
29
(7)
30
(8)
31
(6)

Showing results of 290

<< < 1 .. 4 5 6 7 8 .. 12 > >> (Page 6 of 12)
From: Anthony M. F. <Ant...@co...> - 2007年08月21日 00:07:22
[snip]
> Are you aware that the plot method can plot the columns of=20
> 2-D arrays?=20
> Any kwargs apply to all the lines. When plot does this, it=20
> makes a list of lines, not a line collection, so it is=20
> similar to looping over a set of single plot commands. There=20
> is no particular speed advantage, but it is nice and concise,=20
> if it yields what you actually want.
Interesting! No, I wasn't aware. I'll need to think a bit if that fits
better into the framework we have here.
Thanks for the input.
Anthony.
From: Eric F. <ef...@ha...> - 2007年08月20日 23:57:10
Anthony M. Floyd wrote:
>> -----Original Message-----
>> From: Eric Firing [mailto:ef...@ha...] 
> 
> [snip]
> 
>> It probably comes down to program simplicity and readability, 
>> not speed, in your case.
>>
>> Eric
> 
> 
> Hi Eric,
> 
> Thanks for this. That's essentially the decision I had reached, but I
> was also wondering if I'd missed something significant. I think I will
> code it up as-is right now, and if the routine is unacceptably slow
> re-examine it with an eye to shifting over to using line-collections.
> 
> In the same vein, if I need to refactor, is there any benefit to
> treating single series as a collection with only one segment? I would
> rather treat single series and multiple series in the same manner --
> either plotting single series and multiple single-series or plotting
> single-series collections and multiple-series collections. That is, I'd
> rather not have to treat plotting a single series in one manner and
> multiple series in another.
A collection with only one member should work fine, although I don't 
know whether it has been explicitly tested. So, I don't see any reason 
why you should have to treat a single series as a special case.
Are you aware that the plot method can plot the columns of 2-D arrays? 
Any kwargs apply to all the lines. When plot does this, it makes a list 
of lines, not a line collection, so it is similar to looping over a set 
of single plot commands. There is no particular speed advantage, but it 
is nice and concise, if it yields what you actually want.
Eric
> 
> Thanks,
> Anthony. 
> 
> 
From: Anthony M. F. <Ant...@co...> - 2007年08月20日 23:40:21
> -----Original Message-----
> From: Eric Firing [mailto:ef...@ha...]=20
[snip]
> It probably comes down to program simplicity and readability,=20
> not speed, in your case.
>=20
> Eric
Hi Eric,
Thanks for this. That's essentially the decision I had reached, but I
was also wondering if I'd missed something significant. I think I will
code it up as-is right now, and if the routine is unacceptably slow
re-examine it with an eye to shifting over to using line-collections.
In the same vein, if I need to refactor, is there any benefit to
treating single series as a collection with only one segment? I would
rather treat single series and multiple series in the same manner --
either plotting single series and multiple single-series or plotting
single-series collections and multiple-series collections. That is, I'd
rather not have to treat plotting a single series in one manner and
multiple series in another.
Thanks,
Anthony.=20
From: Eric F. <ef...@ha...> - 2007年08月20日 22:53:50
Anthony,
When I do a quick test of line_collection.py versus a modification that 
makes individual plot calls, with the results written to a png file, I 
get about 1.05 s with the collection and 1.2 s with the lines. But a 
trivial plot still takes 0.52 seconds, so if you subtract out this 
general startup overhead the improvement with the line collection is 
about 30%.
It probably comes down to program simplicity and readability, not speed, 
in your case.
Eric
Anthony M. Floyd wrote:
> I'm trying to figure out the best way to handle the following situation:
> I have a wxApp that embeds a matplotlib figure in a panel. I use custom
> code to control adding and removing series from the axes in this figure,
> with some pretty fine grained control on when things get drawn, zoomed,
> etc. To be clear, I'm not using pylab here, I'm coding directly into
> matplotlib.
> 
> Anyhow, I now have the case where I want to be plotting a modest number
> of series (say 100) with a reasonably large density (say >1000 pts).
> These series will all have the same or similar styles (thickness,
> colour, etc) and will definitely have the same length.
> 
> In context of my current app, I could achieve this simply by calling my
> .addSeries routine multiple times. Or, I could use a Line Collection to
> handle them en masse.
> 
> The thing is, after taking a quick read through of the source code, I'm
> not certain that I'm gaining anything by using a line collection in this
> case. 
> 
> I did a quick comparison using the line_collection.py example, and even
> using pylab there didn't seem to be any performance hit to doing:
> 
> lines = [zip(x,y) for y in ys]
> for series in x:
> 	plot(lines[series])
> 
> Instead of using:
> 
> line_segments = ...
> ax.add_collection(line_segments)
> 
> Can anyone give me advice if I should code targeting collections or to
> just use my current single-series code?
> 
> Thanks,
> Anthony.
> 
> 
> 
> --
> Anthony Floyd, PhD
> Convergent Manufacturing Technologies Inc.
> 6190 Agronomy Rd, Suite 403
> Vancouver BC V6T 1Z3
> CANADA
> 
> Email: Ant...@co... | Tel: 604-822-9682
> WWW: http://www.convergent.ca | Fax: 604-822-9659 
> 
> CMT is hiring: See http://www.convergent.ca for details
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Anthony M. F. <Ant...@co...> - 2007年08月20日 22:01:19
I'm trying to figure out the best way to handle the following situation:
I have a wxApp that embeds a matplotlib figure in a panel. I use custom
code to control adding and removing series from the axes in this figure,
with some pretty fine grained control on when things get drawn, zoomed,
etc. To be clear, I'm not using pylab here, I'm coding directly into
matplotlib.
Anyhow, I now have the case where I want to be plotting a modest number
of series (say 100) with a reasonably large density (say >1000 pts).
These series will all have the same or similar styles (thickness,
colour, etc) and will definitely have the same length.
In context of my current app, I could achieve this simply by calling my
.addSeries routine multiple times. Or, I could use a Line Collection to
handle them en masse.
The thing is, after taking a quick read through of the source code, I'm
not certain that I'm gaining anything by using a line collection in this
case. =20
I did a quick comparison using the line_collection.py example, and even
using pylab there didn't seem to be any performance hit to doing:
lines =3D [zip(x,y) for y in ys]
for series in x:
	plot(lines[series])
Instead of using:
line_segments =3D ...
ax.add_collection(line_segments)
Can anyone give me advice if I should code targeting collections or to
just use my current single-series code?
Thanks,
Anthony.
--
Anthony Floyd, PhD
Convergent Manufacturing Technologies Inc.
6190 Agronomy Rd, Suite 403
Vancouver BC V6T 1Z3
CANADA
Email: Ant...@co... | Tel: 604-822-9682
WWW: http://www.convergent.ca | Fax: 604-822-9659 =20
CMT is hiring: See http://www.convergent.ca for details
From: Johann Cohen-T. <co...@sl...> - 2007年08月20日 20:07:15
That did it.
thanks!
Eric Firing wrote:
> Johann Cohen-Tanugi wrote:
>> hello,
>> I am using matplotlib to make a drawing, so though I am using 
>> distances on the pad I do not need to display the axes and would 
>> rather have no frame and no tick.
>> To achieve this, I tried using :
>> rc('axes', edgecolor='white')
>
> If your axes instance is "ax", try
> ax.set_frame_on(False)
> ax.set_axis_off()
>
> The api is inconsistent, but there it is...
>
> This will actually wipe out the axes patch as well as the boundary, 
> and all traces of the axes; maybe this is more than you want.
>
> Eric
>
>> rc('xtick', color='white')
>> rc('ytick', color='white')
>>
>> The first command works, but not the 2 tick commands (the ticks still 
>> show up, in black)...... Bug or feature? Besides, I am sure there is 
>> a better way to do that, but could not find out.
>> I am using the GTKAgg backend.
>>
>> thanks,
>> Johann
>>
>>
>> ------------------------------------------------------------------------- 
>>
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems? Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Eric F. <ef...@ha...> - 2007年08月20日 19:49:00
Johann Cohen-Tanugi wrote:
> hello,
> I am using matplotlib to make a drawing, so though I am using distances 
> on the pad I do not need to display the axes and would rather have no 
> frame and no tick.
> To achieve this, I tried using :
> rc('axes', edgecolor='white')
If your axes instance is "ax", try
 ax.set_frame_on(False)
 ax.set_axis_off()
The api is inconsistent, but there it is...
This will actually wipe out the axes patch as well as the boundary, and 
all traces of the axes; maybe this is more than you want.
Eric
> rc('xtick', color='white')
> rc('ytick', color='white')
> 
> The first command works, but not the 2 tick commands (the ticks still 
> show up, in black)...... Bug or feature? Besides, I am sure there is a 
> better way to do that, but could not find out.
> I am using the GTKAgg backend.
> 
> thanks,
> Johann
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: John T. <jt...@gm...> - 2007年08月20日 19:00:21
On 20/08/07, Darren Dale <dd...@co...> wrote:
> On Monday 20 August 2007 12:11:30 pm Samuel M.Smith wrote:
> > I can only generate .eps files that will successfully distill
> > into .pdf files when I use
> >
> > ps.usedistiller : xpdf
> > not
> > ps.usedistiller : ghostscript
> > nor
> > ps.usedistiller : None
> >
> > Is this a known problem?
> > ghostscript does work fine for .ps files just not .eps
>
> No, it is not a known problem. I have never had a problem converting an eps to
> pdf, using either setting. Are you using epstopdf? Could you post an example,
> something that actually illustrates a problem?
>
> > In addition when ever I save a .eps file I get the following error
> > even though it creates the file ok
> >
> > : Error: No paper information available - using defaults
> >
> > %%BoundingBox: 78 220 543 561
> > %%HiResBoundingBox: 78.281998 220.589993 542.375983 560.357983
> >
> > Is there a way to fix this?
>
> Is this with verbose.level set to silent?
Interestingly I just installed ubuntu gutsy AMD64 on my machine (yes I
know it's alpha) and found that I get a strangely similar problem
(with subversion matplotlib). But only if i use *xpdf* as the
distiller, not ghostscript. I also get the same error with the
bounding box / no paper information. I put it down to ubuntu alpha
status rather than matplotlib which is why I didn't report it, but
this has made me think possibly otherwise?? I'll send more details if
you're interested.
John
From: Alan G I. <ai...@am...> - 2007年08月20日 18:55:45
On 2007年8月20日, Johann Cohen-Tanugi apparently wrote:
> I am sure there is a 
> better way to do that 
Set the ticks to an empty tuple.
hth,
Alan Isaac
From: Johann Cohen-T. <co...@sl...> - 2007年08月20日 18:51:37
hello,
I am using matplotlib to make a drawing, so though I am using distances 
on the pad I do not need to display the axes and would rather have no 
frame and no tick.
To achieve this, I tried using :
rc('axes', edgecolor='white')
rc('xtick', color='white')
rc('ytick', color='white')
The first command works, but not the 2 tick commands (the ticks still 
show up, in black)...... Bug or feature? Besides, I am sure there is a 
better way to do that, but could not find out.
I am using the GTKAgg backend.
thanks,
Johann
From: Darren D. <dd...@co...> - 2007年08月20日 18:26:48
On Monday 20 August 2007 12:11:30 pm Samuel M.Smith wrote:
> I can only generate .eps files that will successfully distill
> into .pdf files when I use
>
> ps.usedistiller : xpdf
> not
> ps.usedistiller : ghostscript
> nor
> ps.usedistiller : None
>
> Is this a known problem?
> ghostscript does work fine for .ps files just not .eps
No, it is not a known problem. I have never had a problem converting an eps to 
pdf, using either setting. Are you using epstopdf? Could you post an example, 
something that actually illustrates a problem? 
> In addition when ever I save a .eps file I get the following error
> even though it creates the file ok
>
> : Error: No paper information available - using defaults
>
> %%BoundingBox: 78 220 543 561
> %%HiResBoundingBox: 78.281998 220.589993 542.375983 560.357983
>
> Is there a way to fix this?
Is this with verbose.level set to silent?
From: Samuel M. S. <sm...@sa...> - 2007年08月20日 16:11:37
I can only generate .eps files that will successfully distill 
into .pdf files when I use
ps.usedistiller : xpdf
not
ps.usedistiller : ghostscript
nor
 ps.usedistiller : None
Is this a known problem?
ghostscript does work fine for .ps files just not .eps
In addition when ever I save a .eps file I get the following error 
even though it creates the file ok
: Error: No paper information available - using defaults
%%BoundingBox: 78 220 543 561
%%HiResBoundingBox: 78.281998 220.589993 542.375983 560.357983
Is there a way to fix this?
I have
ps.papersize : letter
my configuration
Mac OS X 10.4.10 PPC
python 2.5.1
Matplotlib 0.90.1
ipython 0.8.1
wxPython2.8-osx-unicode-2.8.3.0-universal10.4-py2.5
ghostscript 8.54
xpdf 3.02
**********************************************************************
Samuel M. Smith Ph.D.
2966 Fort Hill Road
Eagle Mountain, Utah 84005-4108
801-768-2768 voice
801-768-2769 fax
**********************************************************************
"The greatest source of failure and unhappiness in the world is
giving up what we want most for what we want at the moment"
**********************************************************************
From: Deen S. <khu...@gm...> - 2007年08月19日 21:24:17
Hi,
 I am trying to plot a graph as shown.
http://trac-hacks.org/attachment/wiki/TracMetrixDashboard/cummulative.PNG
 I am not sure why the label start at the point 1 instead of point 0. Here
is the code that is used to generate the graph.
matplotlib.use(*'Agg'*)
fig = figure()
ax = fig.add_subplot(111) # Create supplot with key 111
ax.cla()
ax.plot(numdates, tkt_cummulative_table[*'Enter'*], *'b-'*)
ax.plot(numdates, tkt_cummulative_table[*'Leave'*], *'r-'*)
ax.plot(numdates, tkt_cummulative_table[*'Finish'*], *'g-'*)
ax.set_xlim( numdates[0], numdates[-1] )
ax.xaxis.set_major_locator(DayLocator())
ax.xaxis.set_major_formatter( DateFormatter(*'%Y-%m-%d'*))
ax.fmt_xdata = DateFormatter(*'%Y-%m-%d %H:%M:%S'*)
labels = ax.get_xticklabels()
setp(labels, rotation=45, fontsize=8)
xlabel(*'Dates (day)'*)
ylabel(*'Counts (times)'*)
title(*'Cummulative flow chart for ticket status history'*)
legend((*'Ticket Entered'*, *'Ticket Left'*, *'Ticket Completed'*), loc=*'upper
left'*)
 numdate is the array of date generated from drange function. I am pretty
new to matplotlib. I create these code from looking at the examples. I
might have done something wrong. If you could put it out for me, it would
be very appreciated.
 I am also wonder why we need ax.set_xlim( numdates[0], numdates[-1]. However,
if I don't use it. There graph will include a few days that aren't in the
numdates in the graph.
Thanks,
Deen
From: Jeff W. <js...@fa...> - 2007年08月18日 23:18:15
Deen Sethanandha wrote:
> Hello,
> 
> I am trying to plot 2 bar charts in the same plane like the one in 
> sourceforge. 
> http://sourceforge.net/project/stats/detail.php?group_id=5470&ugn=python&mode=week&type=tracker 
> <http://sourceforge.net/project/stats/detail.php?group_id=5470&ugn=python&mode=week&type=tracker>
> 
> It would be great to be able to plot like that or 2 bars with 2 colors.
> 
> Thanks,
> Deen
Deen: See table_demo.py at
http://matplotlib.sourceforge.net/screenshots.html
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328
From: Deen S. <khu...@gm...> - 2007年08月18日 20:58:35
Hello,
 I am trying to plot 2 bar charts in the same plane like the one in
sourceforge.
http://sourceforge.net/project/stats/detail.php?group_id=5470&ugn=python&mode=week&type=tracker
 It would be great to be able to plot like that or 2 bars with 2 colors.
Thanks,
Deen
From: Eric F. <ef...@ha...> - 2007年08月17日 22:38:58
Daniel Fish wrote:
> In response to revision number 3641 (bar plotting patch by Michael 
> Forbes (link below): Inside axes.py, the function 'hlines' is missing 
> the line "coll.update(kwargs)" found in the analogous function 'vlines', 
> so the horizontal linewidth kwarg does not update.
Thank you. It is now fixed in 3715.
Eric
From: Tom V. <to...@cr...> - 2007年08月17日 20:36:42
Hi,
What's the equivalent command in matplotlib to matlab's "surf"? I
assume it's Axes3D.plot_surface. But this doesn't see to work. The
code to be ported is:
s = surf(linspace(0,2,100), linspace(-1,1,100), fe');
But in matplotlib I've come up with:
terrain = R.randn(100, 100) / 1
nbumps = 20
f = lambda x: [int(v) for v in x]
bumpsx = 100 * R.rand(1, nbumps)
bumpsx = map(f, bumpsx.round())
bumpsy = 100 * R.rand(1, nbumps)
bumpsy = map(f, bumpsy.round())
f = lambda x: [abs(v) for v in x]
terrain[bumpsx, bumpsy] = map(f, abs(R.randn(1, nbumps))) # TODO:
abs(randn(nbumps, nbumps))
f = lambda x, y: I.lfilter((N.ones((1, x,)) / x)[0], 1, y)
fterrain = (f(20, f(15, terrain).conj().T)).conj().T
x = N.linspace(0, 2, 100)
y = N.linspace(-1, 1, 100)
z = fterrain
surface = axes3d.plot_surface(x, y, z)
The problem is that x, y, and z all should have the same shape (or at
least I assume from the simple3d.py example). But in what's above, x
and y have a shape of (100,), and z has a shape of (100,100). What
should I do instead?
I'm more than happy to share all the source code if that would be
instructive. Thanks.
-Tom
From: Johann Cohen-T. <co...@sl...> - 2007年08月17日 19:07:24
hi Matthieu,
this will work too, with setp instead of set. Clearly 'set' is now 
reserved. Someone should update the user's guide.....
best,
Johann
> ----------------------------------------------------------------------
>
> Message: 1
> Date: 2007年8月16日 18:27:33 +0200
> From: "Matthieu Brucher" <mat...@gm...>
> Subject: Re: [Matplotlib-users] problem with set in current svn HEAD
> To: Mat...@li...
> Message-ID:
> 	<e76...@ma...>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I think you must type :
> set(gca(), 'xticklabels', [])
>
> Matthieu
>
> 
From: Daniel F. <dj...@pd...> - 2007年08月17日 18:57:03
In response to revision number 3641 (bar plotting patch by Michael =
Forbes (link below): Inside axes.py, the function 'hlines' is missing =
the line "coll.update(kwargs)" found in the analogous function 'vlines', =
so the horizontal linewidth kwarg does not update.
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/=
lib/matplotlib/axes.py?view=3Dmarkup&pathrev=3D3641
From: Michael D. <md...@st...> - 2007年08月17日 16:38:12
Unfortunately, I think that is a known bug in 0.90.0. This is fixed in SVN, if you're able to use it.
Cheers,
Mike
From: Steven R. <sr...@ha...> - 2007年08月17日 00:09:55
I've been trying to install matplotlib with interactive plotting
support on a non-standard linux distribution (sidious.isani.org). I
have successfully installed matplotlib 0.90.1 with python 2.4.3 and
IPython 0.7.2. I can make plots with any of the image backends, but
the TkAgg backend fails with an "undefined symbol" error.
To install with TkAgg support I edited setup.py as follows:
BUILD_AGG = 1
BUILD_GTKAGG = 0
BUILD_GTK = 0
BUILD_TKAGG = 1
I run the build and install steps as root, getting no errors. If I
set the backend to Agg I can produce pdf or png plots just fine.
However, when I try to import the TkAgg backend, I get the following
error:
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "/usr/lib/python2.4/site-packages/pylab.py", line 1, in ?
 from matplotlib.pylab import *
 File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line 222, in ?
 new_figure_manager, draw_if_interactive, show = pylab_setup()
 File "/usr/lib/python2.4/site-packages/matplotlib/backends/__init__.py",
line 24, in pylab_setup
 globals(),locals(),[backend_name])
 File "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py",
line 8, in ?
 import tkagg # Paint image to Tk photo blitter extension
 File "/usr/lib/python2.4/site-packages/matplotlib/backends/tkagg.py",
line 1, in ?
 import _tkagg
ImportError: /usr/lib/python2.4/site-packages/matplotlib/backends/_tkagg.so:
undefined symbol: XSetInputFocus
(I get the same error when testing as root or with my own user account)
This looks to me like a linker error. Maybe the xlib library is not
properly linked? I've checked that xsetinputfocus appears in
/usr/X11R7/include/X11/Xlib.h and I have added this directory to
setupext.py as:
basedir = {
 'win32' : ['win32_static',],
 'linux2' : ['/usr/local', '/usr','/usr/X11R7/include/X11',],
 'linux' : ['/usr/local', '/usr','/usr/X11R7/include/X11',],
Is there some other file I should be locating and linking, or some
other way to include xlib?
Thanks,
-steve
From: Patrik J. <pat...@fa...> - 2007年08月16日 23:42:04
Hi again,
A related question: I tried to generate my PDF output with the Cairo
backend, which produces correct axis labels but no transparency. My
impression is that Cairo supports transparency, so is this a deficiency
in the backend? Or is there a trick?
Thanks again,
/Patrik
From: Patrik J. <pat...@fa...> - 2007年08月16日 23:41:44
Hi all,
I've been making some plots with transparency and realized that in order
to get a vector output I have to use the PDF backend instead of PS.
However, the PDF plots have axis labels that are messed up. Instead of
showing "10^3" it shows "10_3", ie all exponents are subscripts, and the
axis numbers are at the top instead of the bottom, so they clobber the
graph title. There must be something not working right, because it's not
usable the way it is. Can anyone suggest fixes?
This is with 0.90.0 on a FC6 x86_64 machine.
Thanks,
/Patrik
From: Eric F. <ef...@ha...> - 2007年08月16日 19:59:19
Peter Würtz wrote:
> Hi,
> 
> Sorry this might look like a really stupid question, but I have not been
> able to find an answer in the matplotlib documentation...
Not a stupid question at all--it is more of a feature request.
> 
> When plotting data points using the "o"-style, some points are truncated
> by the axis borders. Is there a way to define some kind of margin
> without changing the x/y range manually?
No, this is something we probably should add. There are other cases 
also where one wants a margin by default.
> 
> So far, I did some kind of workaround:
> (xmin,xmax) = p.xlim()
> xw = xmax - xmin
> p.xlim(xmin - xw*0.05, xmax + xw*0.05)
> 
> Is there a better way than this?
No, it looks to me like you have found a reasonable workaround. One 
could also put this functionality into a custom Locator class, but that 
is more complicated.
Eric
> 
> Thanks,
> Peter
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Peter <pw...@st...> - 2007年08月16日 19:26:35
Hi,
Sorry this might look like a really stupid question, but I have not been
able to find an answer in the matplotlib documentation...
When plotting data points using the "o"-style, some points are truncated
by the axis borders. Is there a way to define some kind of margin
without changing the x/y range manually?
So far, I did some kind of workaround:
(xmin,xmax) = p.xlim()
xw = xmax - xmin
p.xlim(xmin - xw*0.05, xmax + xw*0.05)
Is there a better way than this?
Thanks,
Peter
2 messages has been excluded from this view by a project administrator.

Showing results of 290

<< < 1 .. 4 5 6 7 8 .. 12 > >> (Page 6 of 12)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /