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


Showing 14 results of 14

From: Jan R. G. <jr...@gm...> - 2005年03月31日 23:59:42
thanks to you all, that's a really big help!!! 
On 2005年3月31日 09:38:26 -0500, Darren Dale <dd...@co...> wrote:
> On Thursday 31 March 2005 04:34 am, Jan Rienyer Gadil wrote:
> > ok, so i've done plotting two list on boa/wxpython
> > now, i want to add labels and everything else to my graph...
> > adding labels i've done this:
> >
> > self.figure = Figure()
> > self.axes = self.figure.add_subplot(111)
> >
> > self.axes.plot(parent.listX,parent.listY, 'bo')
> >
> > self.axes.xlabel(parent.Xaxis.GetStringSelection())
> > self.axes.ylabel(parent.Xaxis.GetStringSelection())
> >
> > self.canvas = FigureCanvas(self, -1, self.figure)
> >
> > ===========================================
> > but i'm getting some error that says:
> > Traceback (most recent call last):
> > File "E:\final docu\Folder4.2pssl2\wxFrame1.py", line 729, in
> > OnGraphOldFileButton
> > wxFrame2.create(self).Show(true)
> > File "E:\final docu\Folder4.2pssl2\wxFrame2.py", line 16, in create
> > return wxFrame2(parent)
> > File "E:\final docu\Folder4.2pssl2\wxFrame2.py", line 39, in __init__
> > self.axes.xlabel(parent.Xaxis.GetStringSelection())
> >
> > AttributeError: Subplot instance has no attribute 'xlabel'
> >
> > ==============================================
> > what should i do???
> 
> Hi Jan,
> 
> axes.xlabel doesnt exist. What you are looking for is
> 
> self.axes.set_xlabel(parent.Xaxis.GetStringSelection())
> self.axes.set_ylabel(parent.Xaxis.GetStringSelection())
> 
> The Matplotlib devs have put a lot of effort into documenting the project. In
> situations like this, I often end up relying on the python interactive
> interpreter to find the method I am looking for:
> 
> from pylab import *
> fig = figure()
> ax = fig.add_subplot(111)
> dir(ax)
> 
> or you could add a line in your own code:
> 
> self.figure = Figure()
> self.axes = self.figure.add_subplot(111)
> 
> self.axes.plot(parent.listX,parent.listY, 'bo')
> print dir(self.axes)
> 
> both would give you a list of available methods.
> 
> Hope this helps,
> 
> Darren
>
From: Brian B. <b-m...@bb...> - 2005年03月31日 21:54:29
John, Kristen:
Thanks a lot for the replies! This is really helpful information.
Also, John, apologies for not looking in the user's guide. I actually misread
its link to be an alternative (PDF) form of the normal docs. Sorry!
Thanks again,
Brian
From: John H. <jdh...@ac...> - 2005年03月31日 21:10:18
What's new in matplotlib 0.74
basic unicode support in *Agg and PS
 See examples/unicode_demo.py. Unicode strings are rendered in the
 agg and postscript backends. Currently, all the symbols in the
 unicode string have to be in the active font file. In later
 releases we'll try and support symbols from multiple ttf files in
 one string. No support yet for unicode ttf filenames
Auto-legends
 The automatic placement of legends is now supported with loc='best';
 see examples/legend_auto.py. We did this at the matplotlib sprint
 at pycon -- Thanks John Gill and Phil! Note that your legend will
 move if you interact with your data and you force data under the
 legend line. If this is not what you want, use a designated
 location code.
Quiver (direction fields)
 Ludovic Aubry contributed a patch for the matlab compatible quiver
 method. This makes a direction field with arrows. See
 examples/quiver_demo.py
boxplot
 David Haas contributed a matlab-compatible boxplot function -- see
 examples/boxplot_demo.py. This currently returns all the boxplot
 boxes, whiskers, flyer points, etc as a list of lines. This will
 soon be refactored to return multiple lists so that the different
 elements can be more readily configured.
Hubble data example
 Perry Greenfield of STScIcontributed this nice example showing
 Hubble data with overlayed
 contours. http://matplotlib.sf.net/screenshots.html#hstdemo
minor enhancements and bug-fixes
 Some ticker locations bugs were fixed including a problem causing a
 memory error in psd, an ellipse bug in backend ps that was causing
 errant lines was fixed, svg text enhanced, added label kwarg to axes
 constructor to support creation of otherwise identical axes, fixed
 the NULL string pointer causing some Japanses fonts to segfault mpl
Downloads at http://matplotlib.sf.net
JDH
From: Fernando P. <Fer...@co...> - 2005年03月31日 19:51:59
John Hunter wrote:
>>>>>>"Darren" == Darren Dale <dd...@co...> writes:
> 
> 
> Darren> Segmentation fault
> 
> me too -- does the stat64 call ring a bell with anyone? Or does the
> output below indicate the stat64 call succeeded and a subsequent
> unknown followup call failed. I'm an strace baby....
> 
> peds-pc311:~> strace pydoc matplotlib.axes
FWIW, identical output here, Fedora 3 box. Python bug, me says.
Best,
f
From: John H. <jdh...@ac...> - 2005年03月31日 15:34:45
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
 Darren> """ % ', '.join(Axes._events) # <---Whats that
 Darren> doing there?
It's building the appropriate docstring from the Axes._events Note
that _events is defined above that docstring with
 _events = ('xlim_changed', 'ylim_changed')
This is basically the principle of trying to avoid having to change
things in two places. We do a lot of this kind of stuff with
docstrings, especially in the pylab module
Eg, for the plot documentation
 plot.__doc__ = _shift_string(Axes.plot.__doc__) + """
 Addition kwargs: hold = [True|False] overrides default hold state"""
You can test removing it to see if this is the cause of the segfault,
but I would be surprised....
Thanks,
JDH
From: Darren D. <dd...@co...> - 2005年03月31日 15:32:25
Disregard that last email, I just learned something new. Sorry.
-- 
Darren
From: Darren D. <dd...@co...> - 2005年03月31日 15:29:27
On Thursday 31 March 2005 09:56 am, John Hunter wrote:
> >>>>> "Darren" == Darren Dale <dd...@co...> writes:
>
> Darren> Segmentation fault
I'm looking through axes.py trying to find a badly formatted docstring (or 
something) and found this:
 def connect(self, s, func):
 """
 Register observers to be notified when certain events occur. Register
 with callback functions with the following signatures. The function
 has the following signature
 func(ax) # where ax is the instance making the callback.
 The following events can be connected to: %s
 The connection id is is returned - you can use this with
 disconnect to disconnect from the axes event
 """ % ', '.join(Axes._events) # <---Whats that doing there?
-- 
Darren
From: John H. <jdh...@ac...> - 2005年03月31日 15:09:14
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
 Darren> Segmentation fault
me too -- does the stat64 call ring a bell with anyone? Or does the
output below indicate the stat64 call succeeded and a subsequent
unknown followup call failed. I'm an strace baby....
peds-pc311:~> strace pydoc matplotlib.axes
...snip....
read(3, "e:\n rowColours = \'w\' "..., 4096) = 4096
read(3, ", x.typecode())\n if len(y"..., 4096) = 4096
read(3, "numRows, numCols, plotNum)\n\n "..., 4096) = 4096
read(3, "nit_bbox(), self.bbox)\n\n\n def"..., 4096) = 4096
read(3, "\')\n t.set_transform(s"..., 4096) = 4096
read(3, "for polar axes (yet)\')\n\n\n def"..., 4096) = 2678
read(3, "", 4096) = 0
close(3) = 0
munmap(0x40ba0000, 4096) = 0
stat64("/usr/local/lib/python2.3/site-packages/matplotlib/axes.py", {st_mode=S_IFREG|0644, st_size=129654, ...}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
peds-pc311:~> uname -a
Linux peds-pc311.bsd.uchicago.edu 2.4.21-15.0.2.ELsmp #1 SMP Wed Jun 16 22:52:07 EDT 2004 i686 i686 i386 GNU/Linux
peds-pc311:~>
From: Darren D. <dd...@co...> - 2005年03月31日 14:58:01
I am getting a Segmentation fault when I run
$ pydoc matplotlib.axes
Could someone confirm this?
-- 
Darren
From: John H. <jdh...@ac...> - 2005年03月31日 14:54:53
>>>>> "Brian" == Brian B <b-m...@bb...> writes:
 Brian> Hello, I graph of weather data from a CGI script using the
 Brian> Agg backend only. The graph is a common time
 Brian> vs. temperature 2D line plot. Since the graph plots every n
 Brian> minutes, the lines on the graph tend to look pointed and
 Brian> not very aesthetically pleasing (as many people have
 Brian> informed me.) I did some research and found I needed to do
 Brian> curve fitting.
 Brian> I'm trying to use 8th order polynomial fitting. I have
 Brian> found a sample on the Web that shows how to use matplotlib
 Brian> to do a best-fit line from polyfit, but I want a curve that
 Brian> follows the curve of weather temperature data.
 Brian> I plot the data using a list of X-coordinates and a list of
 Brian> Y-coordinates. I assume I can call polyfit with (x,y,8)
 Brian> for 8th order polynomial fitting. However, I am not sure
 Brian> what to do with the results. I have tried to translate the
 Brian> 1st order polyfit example for my needs but I don't think I
 Brian> am using the polyfit data correctly.
You would need to use polyval to get the results of polyfit (there is
an example in the matplotlib Users Guide in the Cookbook chapter for a
3rd order fit), but I don't think you want to use an 8-th order
polynomial for this -- as you indicate below, a spline or a filter is
a better choice.
 Brian> Also, it has been suggested that a spline or Butterworth
 Brian> filter on the data may yield more predictable results. I
 Brian> have found some of this functionality in SciPy and a nifty
 Brian> module in a language called Octave. Would matplotlib
 Brian> benefit from this?
Use spline if you want a curve that passes through all your data, use
butterworth or convolution if you want to smooth your data.
scipy is your best bet -- scipy spline and a butterworth filter
examples from my scipy examples directory are included. In general,
we try to stay focused on plotting in matplotlib rather than
algorithms, and leave algorithms to the scipy folks. They are working
hard on getting a modular package that is easy to install. I think it
would be useful to provide some wrappers around scipy in the
matplotlib.mlab module that exposed a matlab interface to some of
their algorithms, with imports done in such a way that having the
additional scipy functionality would be optional
Here is a scipy spline example, plotted with mpl
 from scipy import arange, sin, pi, interpolate
 from pylab import plot, show
 # Cubic-spline
 t = arange(0, 2.0, 0.1)
 y = sin(2*pi*t)
 tck = interpolate.splrep(t, y, s=0)
 tnew = arange(0, 2.0, 0.01)
 ynew = interpolate.splev(tnew, tck, der=0)
 plot(t, y, 'o', tnew, ynew)
 show()
And here is a butterworth filter. Note that filters can introduce
phase shifts in your data (illustrated in this example) so use with
caution!
 from __future__ import division
 from scipy import signal, arange, sin, pi, linspace, transpose
 from RandomArray import normal
 from pylab import plot, show, subplot
 from scipy.signal import buttord, butter, lfilter
 dt = 0.001
 t = arange(0.0, 10.0, dt)
 nse = normal(0.0, 0.1, t.shape)
 #s = 
 s = normal(0.0, 1.0, (len(t),22))
 for i in range(22):
 s[:,i] += sin(2*pi*t)
 lpcf = 3
 lpsf = 5
 Nyq = 1/(2*dt)
 Rp = 2
 Rs = 20
 Wp = lpcf/Nyq
 Ws = lpsf/Nyq
 [n,Wn] = buttord(Wp,Ws,Rp,Rs)
 [b,a] = butter(n,Wn)
 xlp = transpose(lfilter(b,a,transpose(s)))
 subplot(311)
 plot(t, s[:,0])
 subplot(312)
 plot(t, xlp[:,0])
 subplot(313)
 plot(t, xlp[:,1])
 show()
 Brian> Any assistance is much appreciated. I'm just starting out
 Brian> on this type of stuff but it is fascinating to work with!
Have fun!
JDH
From: Darren D. <dd...@co...> - 2005年03月31日 14:38:35
On Thursday 31 March 2005 04:34 am, Jan Rienyer Gadil wrote:
> ok, so i've done plotting two list on boa/wxpython
> now, i want to add labels and everything else to my graph...
> adding labels i've done this:
>
> self.figure = Figure()
> self.axes = self.figure.add_subplot(111)
>
> self.axes.plot(parent.listX,parent.listY, 'bo')
>
> self.axes.xlabel(parent.Xaxis.GetStringSelection())
> self.axes.ylabel(parent.Xaxis.GetStringSelection())
>
> self.canvas = FigureCanvas(self, -1, self.figure)
>
> ===========================================
> but i'm getting some error that says:
> Traceback (most recent call last):
> File "E:\final docu\Folder4.2pssl2\wxFrame1.py", line 729, in
> OnGraphOldFileButton
> wxFrame2.create(self).Show(true)
> File "E:\final docu\Folder4.2pssl2\wxFrame2.py", line 16, in create
> return wxFrame2(parent)
> File "E:\final docu\Folder4.2pssl2\wxFrame2.py", line 39, in __init__
> self.axes.xlabel(parent.Xaxis.GetStringSelection())
>
> AttributeError: Subplot instance has no attribute 'xlabel'
>
> ==============================================
> what should i do???
Hi Jan,
axes.xlabel doesnt exist. What you are looking for is 
self.axes.set_xlabel(parent.Xaxis.GetStringSelection())
self.axes.set_ylabel(parent.Xaxis.GetStringSelection())
The Matplotlib devs have put a lot of effort into documenting the project. In 
situations like this, I often end up relying on the python interactive 
interpreter to find the method I am looking for:
from pylab import *
fig = figure()
ax = fig.add_subplot(111)
dir(ax)
or you could add a line in your own code:
 self.figure = Figure()
 self.axes = self.figure.add_subplot(111)
 self.axes.plot(parent.listX,parent.listY, 'bo')
 print dir(self.axes)
both would give you a list of available methods.
Hope this helps,
Darren
From: John H. <jdh...@ac...> - 2005年03月31日 14:32:16
>>>>> "Jan" =3D=3D Jan Rienyer Gadil <jr...@gm...> writes:
 Jan> ok, so i've done plotting two list on boa/wxpython now, i
 Jan> want to add labels and everything else to my graph... adding
 Jan> labels i've done this:
Glad to see you are getting this working...
 self.figure =3D Figure()=20
 self.axes =3D self.figure.add_subplot(111)=20=20=20=20=20=20=20
 self.axes.plot(parent.listX,parent.listY, 'bo')=20=20=20=20=20=20
 self.axes.xlabel(parent.Xaxis.GetStringSelection())
 Jan> AttributeError: Subplot instance has no attribute 'xlabel'
Rather than giving you the answer, I'll show you how to find it....
You can use python's introspection capability (help, dir, type) to ask
an object about itself. You can insert print statements directly into
your code
 print dir(self.axes) # see below the results of dir(self.axes)
and look for methods that have the right names. Or you can keep a
python shell open and use the python help system. If for example, at
the shell you do help(self.axes), you'll find
 Help on instance of Subplot:
 <matplotlib.axes.Subplot instance>
So self.axes is a Subplot instance. You can then import the Subplot
class and get much richer help by doing
 >>> from matplotlib.axes import Subplot
 >>> help(Subplot)=20=20
If you don't like working from the shell, head on over to the class
docs at http://matplotlib.sourceforge.net/classdocs.html and click on
the "axes" link and near the top of your screen you'll seen a link
that reads
 Subplot(SubplotBase, Axes)
That means the subplot class is derived from SubplotBase and Axes.
Click on Subplot, and read through the available methods. If you get
impatient, search the web page for "xlabel"
Good luck!
JDH
Python 2.3.3 (#2, Apr 13 2004, 17:41:29)
[GCC 3.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from matplotlib.figure import Figure
>>> fig =3D Figure()
>>> ax =3D fig.add_subplot(111)
>>> help(ax)
>>> dir(ax)
['__doc__', '__init__', '__module__', '_alpha', '_axisbg', '_cid', '_clipon=
', '_connected', '_contourHelper', '_contourLabeler', '_cursorProps', '_eve=
nts', '_frameon', '_get_lines', '_get_patches_for_fill', '_get_verts_in_dat=
a_coords', '_gridOn', '_hold', '_init_axis', '_label', '_lod', '_position',=
 '_send_xlim_event', '_send_ylim_event', '_set_artist_props', '_set_lim_and=
_transforms', '_sharex', '_sharey', '_transform', '_transformSet', '_visibl=
e', 'add_artist', 'add_collection', 'add_line', 'add_patch', 'add_table', '=
aname', 'artists', 'autoscale_view', 'axesPatch', 'axhline', 'axhspan', 'ax=
ison', 'axvline', 'axvspan', 'bar', 'barh', 'bbox', 'bottom', 'boxplot', 'c=
la', 'clabel', 'clear', 'clipbox', 'cohere', 'colNum', 'collections', 'conn=
ect', 'contour', 'contourf', 'csd', 'dataLim', 'disconnect', 'draw', 'error=
bar', 'figBottom', 'figH', 'figLeft', 'figW', 'figure', 'fill', 'fmt_xdata'=
, 'fmt_ydata', 'format_coord', 'format_xdata', 'format_ydata', 'get_alpha',=
 'get_axis_bgcolor', 'get_child_artists', 'get_clip_on', 'get_cursor_props'=
, 'get_figure', 'get_frame', 'get_images', 'get_label', 'get_legend', 'get_=
lines', 'get_position', 'get_transform', 'get_visible', 'get_xaxis', 'get_x=
gridlines', 'get_xlim', 'get_xscale', 'get_xticklabels', 'get_xticklines', =
'get_xticks', 'get_yaxis', 'get_ygridlines', 'get_ylim', 'get_yscale', 'get=
_yticklabels', 'get_yticklines', 'get_yticks', 'get_zorder', 'grid', 'has_d=
ata', 'hist', 'hlines', 'hold', 'images', 'imshow', 'in_axes', 'is_figure_s=
et', 'is_first_col', 'is_first_row', 'is_last_col', 'is_last_row', 'is_tran=
sform_set', 'ishold', 'left', 'legend', 'legend_', 'lines', 'loglog', 'numC=
ols', 'numRows', 'panx', 'pany', 'patches', 'pcolor', 'pcolor_classic', 'pi=
ck', 'pie', 'plot', 'plot_date', 'psd', 'quiver', 'right', 'rowNum', 'scale=
d', 'scatter', 'scatter_classic', 'semilogx', 'semilogy', 'set_alpha', 'set=
_axis_bgcolor', 'set_axis_off', 'set_axis_on', 'set_clip_box', 'set_clip_on=
', 'set_cursor_props', 'set_figure', 'set_frame_on', 'set_label', 'set_lod'=
, 'set_position', 'set_title', 'set_transform', 'set_visible', 'set_xlabel'=
, 'set_xlim', 'set_xscale', 'set_xticklabels', 'set_xticks', 'set_ylabel', =
'set_ylim', 'set_yscale', 'set_yticklabels', 'set_yticks', 'set_zorder', 's=
pecgram', 'spy', 'spy2', 'stem', 'table', 'tables', 'text', 'texts', 'title=
', 'toggle_log_lineary', 'top', 'transAxes', 'transData', 'update', 'update=
_datalim', 'update_datalim_numerix', 'update_from', 'viewLim', 'vlines', 'x=
axis', 'yaxis', 'zoomx', 'zoomy', 'zorder']
>>>
From: Jan R. G. <jr...@gm...> - 2005年03月31日 09:34:28
ok, so i've done plotting two list on boa/wxpython
now, i want to add labels and everything else to my graph...
adding labels i've done this:
 self.figure = Figure()
 self.axes = self.figure.add_subplot(111)
 
 self.axes.plot(parent.listX,parent.listY, 'bo')
 
 self.axes.xlabel(parent.Xaxis.GetStringSelection())
 self.axes.ylabel(parent.Xaxis.GetStringSelection())
 
 self.canvas = FigureCanvas(self, -1, self.figure)
===========================================
but i'm getting some error that says:
Traceback (most recent call last):
 File "E:\final docu\Folder4.2pssl2\wxFrame1.py", line 729, in
OnGraphOldFileButton
 wxFrame2.create(self).Show(true)
 File "E:\final docu\Folder4.2pssl2\wxFrame2.py", line 16, in create
 return wxFrame2(parent)
 File "E:\final docu\Folder4.2pssl2\wxFrame2.py", line 39, in __init__
 self.axes.xlabel(parent.Xaxis.GetStringSelection())
AttributeError: Subplot instance has no attribute 'xlabel'
==============================================
what should i do???
From: Jan R. G. <jr...@gm...> - 2005年03月31日 07:32:26
i'd just like to ask how to make a simple graph of two lists???
i've seen this in the tutorials...
a = self.fig.add_subplot(111)
t = numpy.arange(0.0,3.0,0.01)
s = numpy.sin(2*numpy.pi*t)
c = numpy.cos(2*numpy.pi*t)
a.plot(t,s)
a.plot(t,c)
=============
so if i am to plot two lists say listY[] and listX[], i should do this:
a.plot(listY, listX)
=============
please, any help will be greatly appreciated!

Showing 14 results of 14

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