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

Showing results of 193

1 2 3 .. 8 > >> (Page 1 of 8)
From: Dominique O. <Dom...@po...> - 2004年04月30日 23:21:50
Hi,
I have seen related issues recently on the mailing list. I have built 
the latest matplotlib from CVS in SuSE Linux 8.0 with gcc 3.3. The GTK 
backend works fine, but GTKAgg and TkAgg pop up a window but don't 
render the plot. Has anyone had the same problem?
Here is the output of ldd -r _tkagg.so
	libtk8.4.so => /usr/local/lib/libtk8.4.so (0x40003000)
	libtcl8.4.so => /usr/local/lib/libtcl8.4.so (0x400d2000)
	libpng.so.2 => /usr/lib/libpng.so.2 (0x40173000)
	libz.so.1 => /lib/libz.so.1 (0x401a5000)
	libstdc++.so.5 => /usr/local/lib/libstdc++.so.5 (0x401b4000)
	libm.so.6 => /lib/libm.so.6 (0x4026f000)
	libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x40292000)
	libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 (0x402f6000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x402ff000)
	libc.so.6 => /lib/libc.so.6 (0x40316000)
	libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4043e000)
	libdl.so.2 => /lib/libdl.so.2 (0x404fe000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
undefined symbol: _Py_NoneStruct	(./_tkagg.so)
undefined symbol: Py_BuildValue	(./_tkagg.so)
undefined symbol: Py_InitModule4	(./_tkagg.so)
undefined symbol: PyArg_ParseTuple	(./_tkagg.so)
It looks like these 'undefined symbols' are not the cause of the 
problem; they are missing from every .so in my site-packages. They must 
be linked in at run time from somewhere else.
I see that in a previous post, you recommend to link in -lX11 -lXaw,
what exactly do you mean by that? To which command should those be appended?
Thanks in advance !
Dominique
From: John H. <jdh...@ac...> - 2004年04月30日 11:47:10
>>>>> "Jon" == Jon Peirce <Jon...@no...> writes:
 Jon> Hi there! I've been using the legend function in a plot but
 Jon> can't get the location setting to work. I've tried the
 Jon> numeric and string versions of the location codes and tried
 Jon> several backends (but only winXP, python 2.3.3). The legend
 Jon> always appears upper-right.
 Jon> Is this functionality platform-dependent?
No, in the 2 arg version legend(LABELS, LOC), the loc argument must be
a position arg, not be a kwarg. Ie,
 plots.legend( ('test', ), 4)
works. Note that the labels argument needs to be a list or tuple, not
a string as you gave, but this is not related to your problem.
The problem you experienced was due to the inadequate way I was using
introspection to determine which of the many call signatures legend
has. There is an easy fix which gets it right in the case where loc
is a kwarg.
In axes.Aces.legend, replace
 loc = 1
with
 loc = kwargs.get('loc', 1)
as the first line after the doc string.
Hope this helps,
JDH
From: Jon P. <Jon...@no...> - 2004年04月30日 08:43:49
Hi there!
I've been using the legend function in a plot but can't get the location 
setting to work. I've tried the numeric and string versions of the 
location codes and tried several backends (but only winXP, python 
2.3.3). The legend always appears upper-right.
Is this functionality platform-dependent?
#----------------------------------------------
import matplotlib.matlab as plots
import Numeric as num
x = num.arange(10)
plots.plot(x,x)
plots.legend('test',loc=4)
plots.show()
#----------------------------------------------
-- 
Jon Peirce
Nottingham University
+44 (0)115 8467176 (tel)
+44 (0)115 9515324 (fax)
http://www.psychology.nottingham.ac.uk/staff/jwp/
This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
From: Perry G. <pe...@st...> - 2004年04月29日 18:35:13
John Hunter wrote:
> Well, assuming you passed it to matplotlib with no colormap, then a
> default intensity grayscale would be used. In that case, just build
> the rgb array as above using string methods and then take the r, g, or
> b slice out of it since they are all identical.
> 
Yep, this is the simple case.
> If you passed in a colormap, you would need to invert the colormap,
> which would be relatively easy to provide in the colors.Colormap
> interface but I'm having trouble imagining why someone would want to
> do this.
> 
Me too. (Well, I'm thinking of older displays that actually 
used color lookup tables. The image would be stored in the 
display buffer as 8-bit intensity, and displayed to the screen
through a lookup color table. In that case one could manipulate
the image display as a intensity image and expect to read it 
out as such while using whatever psychedelic color table one wanted
to please their eyes. But that's rare these days.)
> Both of these would be lossy, of course, eg if you started with an
> array of floats you would get back an array of UInt8s.
> 
Yep.
> Note agg comes with several helpful pixel converters functions: gray8,
> rgb565, rgb555, bgr24, bgr24, bgra32, abgr32, argb32, rgba32. Perhaps
> the best general solution is to define these as module constants and
> provide a single tostring method that takes one of these constants and
> returns the appropriate string representation. I can image that this
> would be useful both for backend agg and the image module.
> 
Sounds reasonable.
Perry
From: John H. <jdh...@ac...> - 2004年04月29日 18:19:16
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes:
 Flavio> the other way I know to tackle this parsing, using the
 Flavio> method string.replace() also escapes backslashes.
 Flavio> does anybody know of a way to parse expressions without
 Flavio> these side-effects?
I think you are making a conceptual error here (one that I made too
earlier when I was working on mathtext). There is no such thing as a
raw string. the r'\somestring' is a hint to the python parser telling
it to escape all the slashes so you don't have to. Ie, raw strings
and strings are the same thing, and the r prefix just makes it easier
to write strings that have slashes in them.
>>> r'\hi mom'
'\\hi mom'
So when these strings come back to you from Xlator or string.replace
displaying the \,円 that is the right thing to do.
See, for example,
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=7xznb699ph.fsf%40ruckus.brouhaha.com&rnum=14&prev=/groups%3Fq%3Draw%2Bstring%2Bgroup:*python*%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26scoring%3Dd%26start%3D10%26sa%3DN
JDH
From: John H. <jdh...@ac...> - 2004年04月29日 18:08:42
>>>>> "Perry" == Perry Greenfield <pe...@st...> writes:
 Perry> An associated question is how one easily maps a
 Perry> monochromatic image that is displayed in matplotlib back
 Perry> into a monochromatic array. Normally it's going to be
 Perry> converted to rgba even if rgba is not really needed. Is
 Perry> there any simple way of mapping it back to intensity
 Perry> (histogram of the rgba values to determine if such a
 Perry> mapping exists?). Hmmm.
Well, assuming you passed it to matplotlib with no colormap, then a
default intensity grayscale would be used. In that case, just build
the rgb array as above using string methods and then take the r, g, or
b slice out of it since they are all identical.
If you passed in a colormap, you would need to invert the colormap,
which would be relatively easy to provide in the colors.Colormap
interface but I'm having trouble imagining why someone would want to
do this.
Both of these would be lossy, of course, eg if you started with an
array of floats you would get back an array of UInt8s.
Note agg comes with several helpful pixel converters functions: gray8,
rgb565, rgb555, bgr24, bgr24, bgra32, abgr32, argb32, rgba32. Perhaps
the best general solution is to define these as module constants and
provide a single tostring method that takes one of these constants and
returns the appropriate string representation. I can image that this
would be useful both for backend agg and the image module.
JDH
From: Perry G. <pe...@st...> - 2004年04月29日 17:51:03
John Hunter wrote:
> You can do this with string methods already. The question is: is it
> worth adding a to_numerix and/or from_numerix method for performance
> and convenience to directly access the agg pixel buffer representing
> the entire figure canvas. The (smallish) downside of the latter is
> that currently backend_agg does not depend on Numeric/numarray at all.
> 
> There are a couple of ways to go here and I think it would be useful
> to know how people would want to use this functionality. In the
> example below, I show how to get the agg pixel buffer as an rgb string
> and either convert it to an array or pass it to PIL. I need to add
> the tostring_rgba equivalent - I added tostring_rgba this as a helper
> for backend ps which doesn't need alpha.
> 
> If all that is needed is a way to get at the contents as an array,
> then it may be enough to wrap the example code below in a helper
> function or appropriate class method. But if one wants to be able to
> directly manipulate the contents of the agg rgba pixel array using
> numeric and then pass this back to agg, more will be needed.
> 
> So knowing what people need this for, and how critical performance
> issues will be in these cases, is important in deciding which tack to
> take.
> 
It's not a strong driver for us at the moment, but I agree that 
it depends on how people see using this capability. For our part
(and this is just limited to my knee-jerk reaction, there may
be other uses that I can't think of but others may) I would guess
the most common use would be to create some sort of image with
overlays (contours, legends, etc) that one wants to write out
to one of the scientific data formats that are used to store 
scientific images. Normally these would be array-aware and so
arrays make a good intermediary. Perhaps the values would be
manipulated as well as arrays but that seems less likely.
I'll see if I can conceive of any other uses. Saving memory
copying doesn't seem to be that important for these sorts of 
uses since they would not be frequent, nor involve gigantic
images that couldn't stand to be copied.
An associated question is how one easily maps a monochromatic
image that is displayed in matplotlib back into a monochromatic
array. Normally it's going to be converted to rgba even if rgba
is not really needed. Is there any simple way of mapping it back
to intensity (histogram of the rgba values to determine if such
a mapping exists?). Hmmm.
Perry 
From: John H. <jdh...@ac...> - 2004年04月29日 17:31:21
>>>>> "danny" == danny shevitz <dan...@ya...> writes:
 danny> I'm a new user to matplotlib and I don't believe that
 danny> legends play nicely with errorbars. My guess is that each
 danny> errorbar counts as a seperate graph, which screws up the
 danny> counting. Here's some code.
Yes, in this case you are going to have to give legend a little help.
The auto legend only works if the line instances correspond to the
number of legend strings. In the case of error bar, there are a lot
of extra lines in the plot. But you can pass the lines you want to
label to legend. In the case of errorbar, the line handles are
returned separately, one part for the line markers and one part for
the error bars. So it is easy to get the legend you want
from matplotlib.matlab import *
t = arange(0.1, 4, 0.1)
s = exp(-t)
e = 0.1*abs(randn(len(s)))
figure(1) 
l0, errlines0 = errorbar(t, s, e, fmt='bo-') 
l1, errlines1 = errorbar(t, s+1, e, fmt='ro-') 
xlabel('Distance (m)')
ylabel('Height (m)')
title('Mean and standard error as a function of distance')
legend((l0, l1), ('legend 1', 'legend 2'))
show()
From: danny s. <dan...@ya...> - 2004年04月29日 17:22:19
I'm a new user to matplotlib and I don't believe that legends play
nicely with errorbars. My guess is that each errorbar counts as a
seperate graph, which screws up the counting. Here's some code.
thanks,
Danny
#####################################################
from matplotlib.matlab import *
t = arange(0.1, 4, 0.1)
s = exp(-t)
e = 0.1*abs(randn(len(s)))
figure(1) 
errorbar(t, s, e, fmt='bo-') 
errorbar(t, s+1, e, fmt='ro-') 
xlabel('Distance (m)')
ylabel('Height (m)')
title('Mean and standard error as a function of distance')
legend(('legend 1', 'legend 2'))
show()
#####################################################
	
		
__________________________________
Do you Yahoo!?
Win a 20,000ドル Career Makeover at Yahoo! HotJobs 
http://hotjobs.sweepstakes.yahoo.com/careermakeover 
From: John H. <jdh...@ac...> - 2004年04月29日 17:18:08
>>>>> "Perry" == Perry Greenfield <pe...@st...> writes:
 Perry> But it does make sense to have a general function to read
 Perry> out an AGG rendered buffer to a Numeric/numarray array
 Perry> doesn't it? Seems like another good thing to add to the
 Perry> list (unless one can do that already, I forget the details
 Perry> of using AGG by itself).
You can do this with string methods already. The question is: is it
worth adding a to_numerix and/or from_numerix method for performance
and convenience to directly access the agg pixel buffer representing
the entire figure canvas. The (smallish) downside of the latter is
that currently backend_agg does not depend on Numeric/numarray at all.
There are a couple of ways to go here and I think it would be useful
to know how people would want to use this functionality. In the
example below, I show how to get the agg pixel buffer as an rgb string
and either convert it to an array or pass it to PIL. I need to add
the tostring_rgba equivalent - I added tostring_rgba this as a helper
for backend ps which doesn't need alpha.
If all that is needed is a way to get at the contents as an array,
then it may be enough to wrap the example code below in a helper
function or appropriate class method. But if one wants to be able to
directly manipulate the contents of the agg rgba pixel array using
numeric and then pass this back to agg, more will be needed.
So knowing what people need this for, and how critical performance
issues will be in these cases, is important in deciding which tack to
take.
"""
Use backend agg to access the figure canvas as an RGB string and then
convert it to a Numeric array and pass the string it to PIL for
rendering
"""
from matplotlib.matlab import *
from matplotlib.backends.backend_agg import FigureCanvasAgg
plot([1,2,3])
canvas = get_current_fig_manager().canvas
agg = canvas.switch_backends(FigureCanvasAgg)
agg.draw()
s = agg.tostring_rgb() 
# get the width and the height to resize the matrix
l,b,w,h = agg.figure.bbox.get_bounds()
w, h = int(w), int(h)
X = fromstring(s, UInt8)
X.shape = h, w, 3
import Image
im = Image.fromstring( "RGB", (w,h), s)
im.show()
From: Perry G. <pe...@st...> - 2004年04月29日 16:02:10
John Hunter wrote:
> 
> At this time the proliferation of backends was beginning to become a
> maintenance hassle, and Perry Greenfield had a bright idea: another
> backend! But not just any old backend, the mother of all backends,
> that could be used not only for pure image generation but used to
> render directly into the GUI canvases. GTK and WX use native GUI
> drawing code to render the figure, so we not only need to support not
> only all the widget-set related stuff, but all the drawing stuff as
> well.
> 
Well, it wasn't really my idea. Eric Jones adopted this approach
for Chaco and it seemed like a good way of adding lots of functionality 
and removing gui plotting depenencies. So I basically passed the 
idea along.
>
Perry 
From: Perry G. <pe...@st...> - 2004年04月29日 15:51:32
> >>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes:
> 
> Flavio> Hi, Is there a way to get the output of a plot (the
> Flavio> bitmap) and assign it to a bitmap object such as wxBitmap
> Flavio> or wxImage? I know how to do this by saving the figure
> Flavio> and loading it to wxBitmap. But there must be a way to do
> Flavio> it directly. Does anyone know how to do this?
> 
> Using the OO FigureCanvasWxAgg API, which I think you are using, you
> already have the canvas instance. The call to canvas.draw() sets the
> bitmap instance, which you can access as canvas.bitmap. So after any
> draw command canvas.bitmap is updated.
> 
> You can take a look at
> matplotlib.backends.backend_wxagg.FigureCanvasWxAgg.draw to see how
> the backend is using agg to render, create a wxImage and wxBitmap.
> You can either use the result of these calls (canvas.bitmap) or just
> make them yourself in another part of your code.
> 
> JDH
> 
But it does make sense to have a general function to read out an
AGG rendered buffer to a Numeric/numarray array doesn't it? Seems
like another good thing to add to the list (unless one can do
that already, I forget the details of using AGG by itself).
Perry
From: John H. <jdh...@ac...> - 2004年04月29日 15:36:32
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes:
 Flavio> Hi, Is there a way to get the output of a plot (the
 Flavio> bitmap) and assign it to a bitmap object such as wxBitmap
 Flavio> or wxImage? I know how to do this by saving the figure
 Flavio> and loading it to wxBitmap. But there must be a way to do
 Flavio> it directly. Does anyone know how to do this?
Using the OO FigureCanvasWxAgg API, which I think you are using, you
already have the canvas instance. The call to canvas.draw() sets the
bitmap instance, which you can access as canvas.bitmap. So after any
draw command canvas.bitmap is updated.
You can take a look at
matplotlib.backends.backend_wxagg.FigureCanvasWxAgg.draw to see how
the backend is using agg to render, create a wxImage and wxBitmap.
You can either use the result of these calls (canvas.bitmap) or just
make them yourself in another part of your code.
JDH
From: John H. <jdh...@ac...> - 2004年04月29日 15:15:57
>>>>> "Kuzminski," == Kuzminski, Stefan R <SKu...@fa...> writes:
 Stefan> Hi, I have a scatter plot, I need each data to
 Stefan> rendered as a single point ( or symbol ), rather than
 Stefan> a circle. The axis are not the same, so the circles
 Stefan> are distorted in to ovals. Maybe I should be using a
 Stefan> different plot?
This is a "feature" of scatter that has annoyed many people. I'll see
if I can come up with something better.
To plot a dot, use
 plot(x, y, '.') # draws a *very small* circle
or 
 plot(x, y, ',') # draws a pixel
To plot circles (not ellipses) on axes with different scales, use
 plot(x, y, 'o') # draws a circle
In the latter case you can set the marker size attribute in points
 plot(x, y, 'o', markersize=6) # draws a circle with a 6 point radius
As long as you want the markers to be the same size and color, you
should use plot. If you need either the size or color to vary, you
need scatter. In which case I need to get the transform issue fixed
up sooner rather than later.
JDH 
From: Darren D. <dd...@co...> - 2004年04月29日 15:13:37
>It's a good point - the demos don't exist in the exe distro; I think
>this is typical for binary distributions. I think a note on the win32
>installing section pointing out that there is an examples dir in the
>zip file might be helpful. But if there is a standard way for
>including examples in a bdist_wininst and I'm missing it, please let
>me know.
How about a .zip of just the examples? Then they will not be overlooked. 
From: John H. <jdh...@ac...> - 2004年04月29日 15:08:08
>>>>> "Philippe" == Philippe Strauss <phi...@pr...> writes:
 Philippe> The same case as explained in my previous email, but
 Philippe> supplying all values converted to floats:
Responding to both points at once...
The log10 issue you experienced appears to be a ufunc problem. I'm
using the Numeric log10 but in this module don't need it since I'm not
opertating over arrays. Replacing all instances og log10 with
math.log10 in the matplotlib.ticker module.
 Philippe> File
 Philippe> "/usr/lib/python2.2/site-packages/matplotlib/ticker.py",
 Philippe> line 202, in pprint_val if abs(x-int(x))<0.0001*d:
 Philippe> return '%d' % int(x + 0.5) OverflowError: float too
 Philippe> large to convert
You should be able to replace the ints with longs here with no
troubles. Likewise in the LogFormatter class on or around line 234
you should do the same.
I wrote this little example to add to our poor man's unit testing
suite
 from matplotlib.matlab import *
 x = arange(1000) + 2**32
 subplot(211)
 plot(x,x)
 subplot(212)
 loglog(x,x)
 show()
With the changes above, it plots but the log ticker apparently fails
to handle this case so I'll look into that. I think it is because
there are no decades in the plot range.
If you can think of a more suitable test case for plotting large
numbers, please pass it on and I'll include it.
Thanks,
John Hunter
From: John H. <jdh...@ac...> - 2004年04月29日 14:53:33
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
 Darren> I've maybe posted too many times today (:-/), but I have
 Darren> one last comment before I settle in to look at all the
 Darren> nice demos that you awesome dudes have put together. I
 Darren> didnt know these demos existed, I didnt find them on my
 Darren> file system when I searched through the folders that the
 Darren> windows .exe had installed. I downloaded the .zip package
 Darren> and extracted the samples from there, then did a windows
 Darren> search to see if i just hadnt been looking in the right
 Darren> place. The results: it found the examples from the zip
 Darren> file in C:\[path]\examples, and it found another set of
 Darren> examples in matplotlib-0.53.1/examples. But note: there is
 Darren> no mention of C:\... for this set of files, and they dont
 Darren> show up in windows
It's a good point - the demos don't exist in the exe distro; I think
this is typical for binary distributions. I think a note on the win32
installing section pointing out that there is an examples dir in the
zip file might be helpful. But if there is a standard way for
including examples in a bdist_wininst and I'm missing it, please let
me know.
I'm adding to the win32 installing section
 The windows installer *.exe on the download page contains all the
 code you need to get up and tunning. But if you want to try the
 many demos that come in the matplotlib src distribution, download
 the zip file and look in the examples subdir.
It's very helpful of you to let us know all the confusions you
experience in the beginning and where the web site isn't too
enlightening. All of us veterans have forgotten what we didn't know
already, so keep it up.
JDH
From: Gary R. <ga...@em...> - 2004年04月29日 13:25:31
A. Same as for any Python script, just give your script a .pyw extension - it works on my Win98 system. I have matplotlib configured to use the GTKAgg backend.
Gary Ruben
<snip>
> > So this isn't a scipy question, but since it came up during a gplt
> > question I'll ask anyway.
> > 
> > I started using matplotlib for plotting my histograms and a python.exe
> > shell always opens. Is there any way to get rid of this, e.g. run
> > pythonw.exe instead.
> > 
> > thanks,
> > Danny
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
From: Kuzminski, S. R <SKu...@fa...> - 2004年04月29日 12:53:23
Hi,
=20
I have a scatter plot, I need each data to rendered as a single point (
or symbol ), rather than a circle. The axis are not the same, so the
circles are distorted in to ovals. Maybe I should be using a different
plot?
=20
thanks,
Stefan=20
From: Gary P. <pa...@in...> - 2004年04月29日 12:18:18
FYI, there is a matplotlib discussion list, too. 
I'm sending this there.
http://sourceforge.net/mail/?group_id=80706
-g
----- Original Message ----- 
From: "danny shevitz" <dan...@ya...>
To: "scipy" <sci...@sc...>
Sent: Wednesday, April 28, 2004 6:18 PM
Subject: [SciPy-user] matplotlib question
> So this isn't a scipy question, but since it came up during a gplt
> question I'll ask anyway.
> 
> I started using matplotlib for plotting my histograms and a python.exe
> shell always opens. Is there any way to get rid of this, e.g. run
> pythonw.exe instead.
> 
> thanks,
> Danny
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Win a 20,000ドル Career Makeover at Yahoo! HotJobs 
> http://hotjobs.sweepstakes.yahoo.com/careermakeover 
> 
> _______________________________________________
> SciPy-user mailing list
> Sci...@sc...
> http://www.scipy.net/mailman/listinfo/scipy-user
From: John N S G. <jn...@eu...> - 2004年04月29日 10:14:44
 
> Sure. But my recollection was that gui_thread needed a lot of work
> (Eric Jones told me at least a month!), and it could well be that
> one is needed for each gui (it does mapping of gui requests from
> one thread to another or something like that so that a thread
> running the mainloop allows the python interactive loop to run
> separately. It would be nice if gui's played well with each other,
> but I don't know if that is easy to do (or even workable for
> all combinations). If someone knows how to do this sort of thing
> that would be great, but we don't (neither the resources or expertise).
> At the moment I take the position that it is simplest not to mix
> gui's. The current rule of thumb should be that if you want to
> use a shell that runs under a gui, you need the back end in matplotlib
> to go with that gui.
> 
> I hope someone can make me a liar on that.
> 
> Perry 
 
Some time back I experimented with gui_thread. 
One fairly serious problem with gui_thread is that it is important which
thread wxpython gets imported into. 
Eric worked around this by printing a message once gui_thread had been
imported which, interactively was a signal that it was ok to start using
it. There is a README in the gui_thread package which has more details
on this problem.
Now I was interested in gui_thread for two reasons: interactive
plotting with chaco and creating python COM objects which fired up
wxPython gui's. 
The latter is a bit challenging + the solution was to run the gui in a
different thread. So I started off using gui_thread. I had to re-work
the gui_thread code a bit, the trick was to do a bit less work when
importing gui_thread so that I had better control of when wxpython was
imported and hence could make sure it all happened in the right
threads. I fed the fixes back to Eric, but I don't think he wanted to
change the semantics of gui_thread + as he seems to say it really needs
a good re-think.
Meanwhile, Richard Emslie, who works with me took these ideas and has
created a robust system for running this stuff in another thread. 
Richard's stuff works with a package called earthenware that we're
intending to release as open source. Earthenware contains a lot of our
generic code that it really makes no sense for us to keep proprietary. 
Now one thing we are doing in earthenware is creating objects which
separate the description of a GUI from its actual implementation. The
description side is not toolkit specific. This helps a lot with the two
thread problem, since the gui descriptions can be created in one thread
and implemented in the other thread + you only need to import wx in the
thread that does the implementation.
One other nice thing with this approach is you can build servers which
create the gui descriptions, pickle up the objects and send them down a
socket to a remote client which turns them into a GUI. 
Currently, the only toolkit we have gui code for is wxpython + the set
of 'gui components' we have are a bit limited + some need a little
re-thinking, but the basic framework is proving powerful. We keep
threatening to look at a pygtk version, which i suspect wouldn't be huge
amounts of work.
We're planning on going to Europython in June + would be happy to meet
up with anyone interested in this stuff.
The earthenware site is here:
http://www.earthenware-services.org/earthenwarewiki/.
As yet we haven't put the code I'm describing above, we really need to
pull our fingers out and get the code out there -- will try and get some
sort of tarball out there very soon. For now all you will find is a
python package which writes gnumeric spreadsheets.
John
From: Philippe S. <phi...@pr...> - 2004年04月29日 10:09:25
The same case as explained in my previous email, but supplying all values 
converted to floats:
 File "/usr/lib/python2.2/site-packages/matplotlib/ticker.py", line 202, in 
pprint_val
 if abs(x-int(x))<0.0001*d: return '%d' % int(x + 0.5)
OverflowError: float too large to convert
From: Philippe S. <phi...@pr...> - 2004年04月29日 09:59:03
Hello,
Maybe I've found an error in matplotlib.
When trying to plot an SNMP counter (unsigned 32), I got an error
 File "/usr/lib/python2.2/site-packages/matplotlib/ticker.py", line 571, in 
get_locator
 ld = log10(d)
AttributeError: 'long' object has no attribute 'log10'
Full trace in the attached file.
it is triggered only when calling
ax.set_ylim(0, 2**32-1)
or some other values larger than approx 2 * 10^9
From: Darren D. <dd...@co...> - 2004年04月29日 04:41:52
>Gary forwarded:
>* Go to Control Panel->Display properties->Apperance tab, and
>set all fonts to Tahoma (or any other TrueType font).
Interesting, I since am getting complaints about the Tahoma fonts.
I added this line to pango.aliases, and it seems to have worked:
tahoma = "times new roman,angsana new,mingliu,simsun,gulimche,ms 
gothic,latha,mangal,code2000" 
From: Darren D. <dd...@co...> - 2004年04月28日 21:14:42
>Darren Dale wrote:
> > I was thinking about the first example in the tutorial. On windows, TkAgg
> > is the default backend, at least for the precompiled windows version. If
> > Idle is run with -n, the show() command must be omitted, or the window 
> will
> > not render.
>Todd Miller wrote:
>Not in my experience. What's the command sequence you're executing?
Sorry guys, I made a mistake here. I was pasting
from matplotlib.matlab import *
plot([1,2,3,4])
show()
as a block right into Idle -n. Running the commands one at a time does work.
I've maybe posted too many times today (:-/), but I have one last comment 
before I settle in to look at all the nice demos that you awesome dudes 
have put together. I didnt know these demos existed, I didnt find them on 
my file system when I searched through the folders that the windows .exe 
had installed. I downloaded the .zip package and extracted the samples from 
there, then did a windows search to see if i just hadnt been looking in the 
right place. The results: it found the examples from the zip file in 
C:\[path]\examples, and it found another set of examples in 
matplotlib-0.53.1/examples. But note: there is no mention of C:\... for 
this set of files, and they dont show up in windows explorer. 
12 messages has been excluded from this view by a project administrator.

Showing results of 193

1 2 3 .. 8 > >> (Page 1 of 8)
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 によって変換されたページ (->オリジナル) /