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
(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)



Showing results of 280

1 2 3 .. 12 > >> (Page 1 of 12)
From: John H. <jdh...@ac...> - 2005年08月31日 19:07:59
>>>>> "Frank" == Smith, Frank <F....@te...> writes:
 Frank> Hello Matplotlib users, I only just discovered Matplotlib
 Frank> and I'm having great fun with it. Wonderful package. Thank
 Frank> you to all contributors and maintainers.
 Frank> I have an application where the data that I want to plot is
 Frank> only released when it changes. So when this time tagged
 Frank> data is plotted it should be "flat" until the next data
 Frank> value that the application receives at which point the line
 Frank> should go instantaneously vertical to the new y-value, and
 Frank> then go horizontal until it changes again. Some graphics
 Frank> packages that I've used can handle this type of data
 Frank> automatically. I haven't found anything in the
 Frank> documentation or examples that shows this kind of feature
 Frank> in Matplotlib. Has anyone implemented a similar type of
 Frank> data handling application or is there something I've missed
 Frank> in Matplotlib? Any help or direction to this newbie would
 Frank> be very appreciated.
Here is an example that does something close to what you are trying to
do. It takes advantage of the new animation drawing techniques
described at http://www.scipy.org/wikis/topical_software/Animations
and requires matplotlib CVS. These techniques work with GTKAgg, WXAgg
and TkAgg.
To do this right, you will probably want to take advantage of your GUI
event handling framework, eg an idle handler or a timer. The example
below uses the gtk idle handler, but this approach should work fine
with other toolkits.
There are some refinements. Eg you could make the redrawing more
efficient potentially by narrowing the bbox you want to redraw in the
call to self.canvas.blit(self.ax.bbox). You could also tweak this to
preserve the old line (eg the 0-10 second data) while you are
redrawing the new line (eg the 10-20 second data) in the way many
oscilloscopes do. 
But this should get you started. If you refine it or generalize it,
please post the fruits of your labors.
import gobject, gtk
import matplotlib
matplotlib.use('GTKAgg')
import matplotlib.numerix as nx
from matplotlib.lines import Line2D
class Scope:
 def __init__(self, ax, maxt=10, dt=0.01):
 self.ax = ax
 self.canvas = ax.figure.canvas
 self.dt = dt
 self.maxt = maxt
 self.tdata = [0]
 self.ydata = [0]
 self.line = Line2D(self.tdata, self.ydata, animated=True)
 self.ax.add_line(self.line)
 self.background = None
 self.canvas.mpl_connect('draw_event', self.update_background)
 self.ax.set_ylim(-.1, 1.1)
 self.ax.set_xlim(0, self.maxt)
 def update_background(self, event):
 self.background = self.canvas.copy_from_bbox(self.ax.bbox)
 
 def emitter(self, p=0.01):
 'return a random value with probability p, else 0'
 v = nx.mlab.rand(1)
 if v>p: return 0.
 else: return nx.mlab.rand(1)
 def update(self, *args):
 if self.background is None: return True
 y = self.emitter()
 lastt = self.tdata[-1]
 if lastt>self.tdata[0]+self.maxt: # reset the arrays 
 self.tdata = [self.tdata[-1]]
 self.ydata = [self.ydata[-1]]
 self.ax.set_xlim(self.tdata[0], self.tdata[0]+self.maxt)
 self.ax.figure.canvas.draw()
 
 self.canvas.restore_region(self.background)
 
 t = self.tdata[-1] + self.dt 
 self.tdata.append(t)
 self.ydata.append(y)
 self.line.set_data(self.tdata, self.ydata)
 self.ax.draw_artist(self.line)
 self.canvas.blit(self.ax.bbox)
 return True
from pylab import figure, show
fig = figure()
ax = fig.add_subplot(111)
scope = Scope(ax)
gobject.idle_add(scope.update)
show()
From: Smith, F. <F....@te...> - 2005年08月31日 14:18:01
Hello Matplotlib users,
I only just discovered Matplotlib and I'm having great fun with it.
Wonderful package. Thank you to all contributors and maintainers.
I have an application where the data that I want to plot is only
released when it changes. So when this time tagged data is plotted it
should be "flat" until the next data value that the application receives
at which point the line should go instantaneously vertical to the new
y-value, and then go horizontal until it changes again. Some graphics
packages that I've used can handle this type of data automatically. I
haven't found anything in the documentation or examples that shows this
kind of feature in Matplotlib. Has anyone implemented a similar type of
data handling application or is there something I've missed in
Matplotlib? Any help or direction to this newbie would be very
appreciated.
Thanks,
Frank
From: Nicholas Y. <su...@su...> - 2005年08月31日 10:35:40
On Wed, 2005年08月31日 at 08:15 +0200, Sascha GL wrote:
> > As far as I know (and could very well be wrong)
> > libpng requires a FILE*, which StringIO and cStringIO do not provide.
> 
> I think this is exactly the reason why printing to stdout fails.
> 
> Well, if anybody has any other idea I'd be very grateful.
I posted this to the list a few days ago:
Using the agg backend you can obtain an RGBA buffer or RGB string which
can then be loaded as a PIL Image for processing. I've adapted a the
examples/agg_oo.py to demonstrate.
----
from matplotlib.backends.backend_agg \
 import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
import Image
fig = Figure()
canvas = FigureCanvas(fig)
ax = fig.add_subplot(111)
ax.plot([1,2,3])
ax.set_title('hi mom')
ax.grid(True)
ax.set_xlabel('time')
ax.set_ylabel('volts')
canvas.draw()
size = canvas.get_width_height()
usebuffer = True
if usebuffer:
 # Load the agg buffer directly as the source of the PIL image
 # - could be less stable as agg and PIL share memory.
 buf = canvas.buffer_rgba()
 im = Image.frombuffer('RGBA', size, buf, 'raw', 'RGBA', 0, 1)
else:
 # Save the agg buffer to a string and load this into the PIL image.
 buf = canvas.tostring_rgb()
 im = Image.fromstring('RGB', size, buf, 'raw', 'RGB', 0, 1)
im.show()
----
If you are using a recent CVS version of mpl you will need to change
buffer_rgba() to buffer_rgba(0,0).
Nick
> As far as I know (and could very well be wrong)
> libpng requires a FILE*, which StringIO and cStringIO do not provide.
I think this is exactly the reason why printing to stdout fails.
Well, if anybody has any other idea I'd be very grateful.
Sascha
-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++
From: John H. <jdh...@ac...> - 2005年08月31日 03:45:36
>>>>> "Sascha" == Sascha <sas...@gm...> writes:
 Sascha> I am writing a web server app that creates charts among
 Sascha> other things. I am trying to get rid of the temporary file
 Sascha> that I use to transmit the figures created with matplotlib
 Sascha> to the actual web server. Although print_figure says "If
 Sascha> filename is a fileobject, write png to file object (thus
 Sascha> you can, for example, write the png to stdout)" I can't
 Sascha> successfully write anything to stdout. Anyone knows an
 Sascha> example or can give me some hint what I can do to get rid
 Sascha> of the tempfile?
Short answer: no known way to do this currently, though we'd like to
figure it out. As far as I know (and could very well be wrong)
libpng requires a FILE*, which StringIO and cStringIO do not provide.
JDH
From: Aleksander Schwarzenberg-C. <al...@ca...> - 2005年08月31日 01:19:01
Hi!
Indeed, I misunderstood documentation and installed only one package
from two (Numeric and numarray). After installation of Numeric and 
devels for tcl and tk installation went smoothly.
Thank you
Alex Schwarzenberg-Czerny
On 
2005年8月30日, Fernando Perez wrote:
> Aleksander Schwarzenberg-Czerny wrote:
> 
> > src/_transforms.cpp:8:34: Numeric/arrayobject.h: No such file or directory
> 
> > Do I miss some required package?
> 
> First, check whether you actually have numeric installed:
> 
> planck[python]> python -c 'import Numeric;print Numeric.__version__'
> 23.7
> 
> If that works, it means that you have installed the Numeric headers in some 
> non-standard location. On my system, they live in:
> 
> planck[python]> locate arrayobject.h
> /usr/include/python2.3/Numeric/arrayobject.h
> 
> 
> I believe by default, distutils adds automatically /path/to/include/python to 
> the include file search path (via -I), but if you've installed Numeric in some 
> non-standard location, that automatic search may fail. I don't see 
> immediately a way to tell distutils to add specific extra paths, but there may 
> be one. The cheap fix is to copy the Numeric/*.h directory over to the 
> standard python location for headers in your system.
> 
> Cheers,
> 
> f
> 
From: Fernando P. <Fer...@co...> - 2005年08月30日 23:15:12
Aleksander Schwarzenberg-Czerny wrote:
> src/_transforms.cpp:8:34: Numeric/arrayobject.h: No such file or directory
> Do I miss some required package?
First, check whether you actually have numeric installed:
planck[python]> python -c 'import Numeric;print Numeric.__version__'
23.7
If that works, it means that you have installed the Numeric headers in some 
non-standard location. On my system, they live in:
planck[python]> locate arrayobject.h
/usr/include/python2.3/Numeric/arrayobject.h
I believe by default, distutils adds automatically /path/to/include/python to 
the include file search path (via -I), but if you've installed Numeric in some 
non-standard location, that automatic search may fail. I don't see 
immediately a way to tell distutils to add specific extra paths, but there may 
be one. The cheap fix is to copy the Numeric/*.h directory over to the 
standard python location for headers in your system.
Cheers,
f
From: Robert K. <rk...@uc...> - 2005年08月30日 23:12:05
Aleksander Schwarzenberg-Czerny wrote:
> Dear matplotlib Pundits,
> I am trying to install matplotlib-0.83.2 on my FedoraCore3 linux.
> It seems I got installed all required packages (including pygtk2 and gtk2) 
> and the corresponding devel packages. After running
> python setup.py build
> I got many messages, terminated with the following error message:
> ++/3.4.4/functional:54,
> from src/_transforms.cpp:1:
> /usr/include/features.h:150:1: warning: this is the location of the 
> previous definition
> src/_transforms.cpp:8:34: Numeric/arrayobject.h: No such file or directory
> Do I miss some required package?
Numeric.
http://numeric.scipy.org
-- 
Robert Kern
rk...@uc...
"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
 -- Richard Harter
From: Aleksander Schwarzenberg-C. <al...@ca...> - 2005年08月30日 23:08:17
Dear matplotlib Pundits,
I am trying to install matplotlib-0.83.2 on my FedoraCore3 linux.
It seems I got installed all required packages (including pygtk2 and gtk2) 
and the corresponding devel packages. After running
python setup.py build
I got many messages, terminated with the following error message:
++/3.4.4/functional:54,
 from src/_transforms.cpp:1:
/usr/include/features.h:150:1: warning: this is the location of the 
previous definition
src/_transforms.cpp:8:34: Numeric/arrayobject.h: No such file or directory
src/_transforms.cpp: In member function `Py::Object 
Bbox::update_numerix(const Py::Tuple&)':
src/_transforms.cpp:436: error: `PyArrayObject' undeclared (first use this 
function)
src/_transforms.cpp:436: error: (Each undeclared identifier is reported 
only once for each function it appears in.)
...
src/_transforms.cpp:1974: error: `import_array' undeclared (first use this 
function)
error: command 'gcc' failed with exit status 1
Do I miss some required package?
Alex Schwarzenberg-Czerny 
From: <dav...@fr...> - 2005年08月30日 22:43:44
 david> I have different lines (at least two) that I would like to
 david> update and also hide/show and I expected that autoscaling
 david> will take all these aspects (updated data, hiden data) to
 david> scale the graph to all visible data.
 david> Furthermore I use the sharey stuff that complicated a bit the=
 story
Thank you very much John. It works !
Here is the final version of the algorithm:
line_list is the list of line
 >ignore =3D True
 >for line in (line_list):
 > if not line.get_visible(): continue
 > self.ax.dataLim.update_numerix( line.get_xdata(),
 > line.get_ydata(),
 > ignore )
 > ignore =3D False
 >self.ax.autoscale_view()
Note: we cannot use update_datalim_numerix() because "ignore" is not an a=
rgument
 but using dataLim.update_numerix is ok.
This version allows to avoid problem if the fist line is
not visible (compared to your original version)
Same function applied to the second axes which share the y axis
and everything is perfect :-)
What about adding this function to the axes class using the line list ava=
ilable?
Should give something like:
 def autoscale_visible_lines(self):
 ignore =3D True
 for line in (self.lines):
 if not line.get_visible(): continue
 self.dataLim.update_numerix( line.get_xdata(),
 line.get_ydata(),
 ignore )
 ignore =3D False
 self.autoscale_view()
Thanks for your help and your amazing matplotlib !
Best regards,
David
Selon John Hunter <jdh...@ac...>:
> If you have a list of lines that you want to pass to the autoscaler,
> and have it operate on that list only (ignoring previous settings) do
> the following
>
> First update your line data and then create a list of lines that you
> want to autoscale for. The ignore setting will be True for the first
> line in the list which will cause it to ignore it's history. Thus the
> datalim will be updated to bound only the lines in the list "lines"
>
> for i,line in enumerate(lines):
> ignore =3D i=3D=3D0
> if not line.get_visible(): continue
> x =3D asarray(line.get_xdata())
> y =3D asarray(line.get_ydata())
> ax.update_datalim_numerix(x, y, ignore)
> ax.autoscale_view()
>
> You should be able to do this separately for each of your two axes
> (even if they are sharing the x axes, their y axes is independent).
>
> If you are still having trouble after trying this, please post a
> complete example.
>
> JDH
>
From: Sascha <sas...@gm...> - 2005年08月30日 20:04:50
I am writing a web server app that creates charts among other things. I am 
trying to get rid of the temporary file that I use to transmit the figures 
created with matplotlib to the actual web server. Although print_figure says 
"If filename is a fileobject, write png to file object (thus you can, for 
example, write the png to stdout)" I can't successfully write anything to 
stdout. Anyone knows an example or can give me some hint what I can do to 
get rid of the tempfile?
Thanks,
Sascha 
From: <dav...@fr...> - 2005年08月30日 20:01:13
Hello,
 No actually it doesn't work exactly as I expected.
I have different lines (at least two) that I would like to
update and also hide/show and I expected that autoscaling will take all
these aspects (updated data, hiden data) to scale the graph to all visibl=
e data.
The main problem is that old data limit is kept or totaly lost. The axes
scaling doesn't seem to work with the list of lines,
but is updated each time you add a line to the axes (as far as
I can undestand from the source code). So the scale can only be increased
but never decreased. Am I write or wrong ?
Furthermore I use the sharey stuff that complicated a bit the story.
So I don't think I can easelly do what I want using the axes class.
Maybe I should calculate the scaling in my software and set the min/max v=
alue.
If one of you have another idea please let me know.
Thanks for your help,
David
Selon John Hunter <jdh...@ac...>:
> >>>>> "David" =3D=3D David <dav...@fr...> writes:
> David> I use the class library and I run into trouble with
> David> autoscaling.
>
> David> I expected that autoscale_view() function of axes class
> David> would do autoscaling. But if I update the data using
> David> set_data(), set_xdatat() or set_ydata() (of lines object)
> David> and I call autoscale_view() of the corresponding axes and
> David> then redraw the canvas, the scale is not changed and some
> David> data points are thus out of the picture.
>
> The axes keeps a copy of the "dataLim" and won't automatically know if
> you change the line's data. You need to call
>
> ax.update_datalim_numerix(x, y, ignore)
>
> where x and y are the numerix arrays you pass to line.set_data.
>
> If ignore is True, the previous data passed to the axes will be
> ignored in computing the new datalim. If False, the datalim will
> include the previous data and the current data you are passing it.
>
> After this, a call to
>
> ax.autoscale_view()
>
> should work as you expect.
>
> JDH
>
From: John H. <jdh...@ac...> - 2005年08月30日 14:38:59
>>>>> "Schindler" == Schindler Benjamin <ben...@si...> writes:
 Schindler> Hi In my program, I do a lot of axis changes and
 Schindler> redraws / resizes. The redraw speed of matplotlib seems
 Schindler> very bad at best - is there anything I can do to make
 Schindler> it go faster?
Start here : http://matplotlib.sourceforge.net/faq.html#SLOW
The best thing you can do is create a sample application that you feel
is slow that can be run on our machines -- eg create a dummy data
server to replace for your real data server. Then run your script
with some timing information to get an estimate of how fast the draw
is on your system (eg frames/second, see
examples/dynamic_image_gtkagg.py for one example which uses timing).
That way we can see if we are getting comparable performance numbers
and more importantly, may be able to suggest some improvements.
Generally the three things that make drawing slow are
 * creating too many objects (use collections instead).
 * using a backend which has a slow Agg->GUI widget transfer speed. I
 just checked in Ken's patch which fixes this for WXAgg.
 * redrawing the entire canvas when you only need to redraw a selected
 artist or two. See
 http://www.scipy.org/wikis/topical_software/Animations -- Ken's
 patch in CVS also added support for this kind of redrawing to
 WXAgg.
Hope this helps,
JDH
From: Benjamin S. <bsc...@st...> - 2005年08月30日 12:48:06
> Is this what you are looking for :
> legend([""], [""])
> 
> - Thomas 
Thanks, this works but is not really a solution. As you see (below), I have
to add the [''] to the list to prevent it from crashing. To me, this is a
workaround, not a solution. I can use it for now, but this should be fixed
in matplotlib imho
enabled_sources = [x for x in self.data if self.data[x][1] == True]
self.figure.legends = []
self.figure.legend(map(lambda x: self.data[x][0], enabled_sources), 
	enabled_sources + [''], 'upper right', shadow=True)
From: Darren D. <dd...@co...> - 2005年08月30日 12:33:24
On Tuesday 30 August 2005 1:37 am, si...@sc... wrote:
> > Try increasing the tick.major.pad in your rc settings
>
> Much obliged, Darren, that was just what I needed. Another small
> imposition, if I may: I'm using twinx() to get a second y-axis for a plot.
> It works fine, except that the tick marks from the first axis are also
> present on the right-hand side, causing a bit of a mess. Is there a way to
> suppress printing the tick marks just for the right plot side? All the
> reading I've done leads me to believe that this is an all-or-nothing
> affair, as I can only suppress tick marks by setting yticks to the empty
> set, and this of course removes all the tick marks on that axis. Am I
> missing something obvious here? I noticed that the two_scales.py demo
> exhibits the same behaviour (juxtaposing the two sets of ticks on the right
> side).
try this:
plot([1,2,3,4])
gca().yaxis.tick_left()
twinx()
plot([11,12,13,14])
Darren
From: Schindler B. <ben...@si...> - 2005年08月30日 12:11:12
Hi
I'm using dynamic legends but Legend doesn't seem to be able to handle empty
legends. 
I know that I could just refuse to do an empty legend, but I still would
call this behaviour a bug:
from pylab 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([], [])
show()
With: 
Traceback (most recent call last):
 File "test.py", line 12, in ?
 legend([], [])
 File "C:\PROGRA~1\python23\Lib\site-packages\matplotlib\pylab.py", line
2315, in legend
 ret = gca().legend(*args, **kwargs)
 File "C:\PROGRA~1\python23\Lib\site-packages\matplotlib\axes.py", line
2044, in legend
 self.legend_ = Legend(self, handles, labels, loc, **kwargs)
 File "C:\PROGRA~1\python23\Lib\site-packages\matplotlib\legend.py", line
181, in __init__
 left, top = self.texts[-1].get_position()
IndexError: list index out of range
This shouldn't be the case - right?
From: Schindler B. <ben...@si...> - 2005年08月30日 09:13:14
Hi
In my program, I do a lot of axis changes and redraws / resizes. The redraw
speed of matplotlib seems very bad at best - is there anything I can do to
make it go faster?
Thanks
Benjamin Schindler
From: Benjamin S. <bsc...@st...> - 2005年08月30日 09:07:51
I have sortof solved my problem. The main problem was, that =
autoscrolling
doesn't seem to work the way it should - now paired with a little bug =
that
got hidden made these problems for me. Since I have to control my y and =
x
axis closely anyway, There is no real problem anymore.=20
Thanks for all the help.=20
-----Urspr=FCngliche Nachricht-----
Von: John Hunter [mailto:jdh...@ac...]=20
Gesendet: Dienstag, 30. August 2005 00:22
An: Benjamin Schindler
Cc: 'Werner F. Bruhin'; mat...@li...
Betreff: Re: [Matplotlib-users] Re: Line2D and wx Backend
>>>>> "Benjamin" =3D=3D Benjamin Schindler <bsc...@st...> =
writes:
 Benjamin> Hi Sortof, but not really. I've just discovered
 Benjamin> something reeeally interesting.
 Benjamin> I've produced a sample app that exhibits this
 Benjamin> behaviour. However, monitor.py (in plugins/wx) still
 Benjamin> depends on twisted.spread.pb. If I comment out that
 Benjamin> import, it all runs fine. (you can add data with the a
 Benjamin> button and the slider in the left pane) It's hard for me
 Benjamin> guess who is causing the troubles - whether it's
 Benjamin> matplotlib not beeing able to handle the twisted
 Benjamin> threading or twisted breaking matplotlib - I don't know
Yep, this looks like a threading problem. Could be a tough nut to
crack. Sorry, but I don't have any concrete suggestions for you.
Perhaps someone on the wx list would have some idea how to make wx
events play nicely with twisted threads.
JDH
From: <si...@sc...> - 2005年08月30日 05:37:39
> Try increasing the tick.major.pad in your rc settings 
Much obliged, Darren, that was just what I needed. Another small imposition,
if I may: I'm using twinx() to get a second y-axis for a plot. It works 
fine, except that the tick marks from the first axis are also present on the
right-hand side, causing a bit of a mess. Is there a way to suppress
printing the tick marks just for the right plot side? All the reading I've
done leads me to believe that this is an all-or-nothing affair, as I can
only suppress tick marks by setting yticks to the empty set, and this of
course removes all the tick marks on that axis. Am I missing something
obvious here? I noticed that the two_scales.py demo exhibits the same
behaviour (juxtaposing the two sets of ticks on the right side).
Cheers and thanks,
Mike Sipior
From: Jeff W. <js...@fa...> - 2005年08月30日 01:25:04
John Hunter wrote:
>>>>>>"Vidar" == Vidar Gundersen <vid...@37...> writes:
>>>>>> 
>>>>>>
>
> Vidar> thanks for providing this, i hope this will be included in
> Vidar> the matplotlib distribution, along with your script for
> Vidar> previewing and listing all colormaps? (see modification of
> Vidar> original code below.)
>
>I haven't been able to find any licensing information for the color
>scales at colorbrewer or http://geography.uoregon.edu/datagraphics .
>Does anyone know what their license is, if any?
>
>JDH
>
> 
>
John: Colorbrewer uses an apache-style license 
(http://www.personal.psu.edu/faculty/c/a/cab38/ColorBrewer/ColorBrewer_updates.html). 
I don't know about the DataGraphics color schemes.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449
325 Broadway Web : http://www.cdc.noaa.gov/~jsw
Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124
From: John H. <jdh...@ac...> - 2005年08月29日 22:37:02
>>>>> "Vidar" == Vidar Gundersen <vid...@37...> writes:
 Vidar> thanks for providing this, i hope this will be included in
 Vidar> the matplotlib distribution, along with your script for
 Vidar> previewing and listing all colormaps? (see modification of
 Vidar> original code below.)
I haven't been able to find any licensing information for the color
scales at colorbrewer or http://geography.uoregon.edu/datagraphics .
Does anyone know what their license is, if any?
JDH
From: John H. <jdh...@ac...> - 2005年08月29日 22:23:42
>>>>> "Pierre" == Pierre Hanser <ha...@cl...> writes:
 Pierre> hello it seems that the two examples date_demo1 et
 Pierre> date_demo2 do not work if LC_TIME is not C. At least, they
 Pierre> don't work with fr_FR.UTF-8 nor with fr_FR.
 Pierre> Is this a known problem? is it a python or a matplotlib
 Pierre> problem? -- Pierre
Could you be more specific about what you mean "don't work"? Do they
crash, do they have the wrong timezone, are the date strings formatted
improperly?
JDH
From: John H. <jdh...@ac...> - 2005年08月29日 22:22:35
>>>>> "Benjamin" == Benjamin Schindler <bsc...@st...> writes:
 Benjamin> Hi Sortof, but not really. I've just discovered
 Benjamin> something reeeally interesting.
 Benjamin> I've produced a sample app that exhibits this
 Benjamin> behaviour. However, monitor.py (in plugins/wx) still
 Benjamin> depends on twisted.spread.pb. If I comment out that
 Benjamin> import, it all runs fine. (you can add data with the a
 Benjamin> button and the slider in the left pane) It's hard for me
 Benjamin> guess who is causing the troubles - whether it's
 Benjamin> matplotlib not beeing able to handle the twisted
 Benjamin> threading or twisted breaking matplotlib - I don't know
Yep, this looks like a threading problem. Could be a tough nut to
crack. Sorry, but I don't have any concrete suggestions for you.
Perhaps someone on the wx list would have some idea how to make wx
events play nicely with twisted threads.
JDH
From: John H. <jdh...@ac...> - 2005年08月29日 22:21:24
>>>>> "David" == David <dav...@fr...> writes:
 David> Hi all, and thanks for amazing matplotlib. I devellop my
 David> data processing / plotting software using glade, pygtk,
 David> scipy and matplotlib 0.83.2.
 David> I use the class library and I run into trouble with
 David> autoscaling.
 David> I expected that autoscale_view() function of axes class
 David> would do autoscaling. But if I update the data using
 David> set_data(), set_xdatat() or set_ydata() (of lines object)
 David> and I call autoscale_view() of the corresponding axes and
 David> then redraw the canvas, the scale is not changed and some
 David> data points are thus out of the picture.
 David> Do I miss or misunderstand something ?
The axes keeps a copy of the "dataLim" and won't automatically know if
you change the line's data. You need to call
 ax.update_datalim_numerix(x, y, ignore)
where x and y are the numerix arrays you pass to line.set_data.
If ignore is True, the previous data passed to the axes will be
ignored in computing the new datalim. If False, the datalim will
include the previous data and the current data you are passing it.
After this, a call to 
 ax.autoscale_view()
should work as you expect.
JDH
From: David <dav...@fr...> - 2005年08月29日 21:03:01
Hi all, and thanks for amazing matplotlib.
 I devellop my data processing / plotting software using glade,
pygtk, scipy and matplotlib 0.83.2.
I use the class library and I run into trouble with autoscaling.
I expected that autoscale_view() function of axes class would
do autoscaling. But if I update the data using set_data(),
set_xdatat() or set_ydata() (of lines object) and I call
autoscale_view() of the corresponding axes and then redraw
the canvas, the scale is not changed and some data points are
thus out of the picture.
Do I miss or misunderstand something ?
Regards,
David
3 messages has been excluded from this view by a project administrator.

Showing results of 280

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