|
From: Derek H. <DH...@cs...> - 2006-08-21 07:20:43
|
The matplotlib philosophy is one of "make easy things easy" - which I totally agree with. I am a new user of matplotlib; and a relatively new Python programmer. I am trying to produce some bar charts for a colleague, in an attempt to show how easy it is to do this with Python/matplotlib (as opposed to the old Excel/cut-n-paste approach!). I think I have got the basics OK (two subplots), but I am struggling with what *I* think should be trivial tasks - such as setting line widths, font sizes, bar colours etc. The examples do not really seem to deal with these issues, and in fact the homepage implies these are for a "power user", which I find strange because these are some of the first things most users want to "fiddle" with! What I have done as a temporary fix is alter all the settings in the matplotprc file; but this is not ideal as these settings affect *all* charts. It appears the manual (which I assume might be able to help me) is not "downloadable". The link : http://matplotlib.sourceforge.net/users_guide_0.87.1.pdf results in a 2.41MB PDF file, which Acrobat Reader reports is "damaged". (I also noticed when running the download, that the download manager seemed to be expecting a 4.5MB file?) The example: http://www.scipy.org/Cookbook/Matplotlib/BarCharts shows how to setup labels for a bar chart - but it would be great if there was a line-by-line explanation of what each step means; its not very clear! The last point of "mystery" to me is that of "plot" vs "subplot" vs "bar" - are these all essentially the same family of object, with some differences in their capabilities - or vastly different beasts? Any help with these "newbie" issues would be appreciated! Thanks Derek -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to Cal...@cs.... This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. |
|
From: Bill B. <wb...@gm...> - 2006-08-21 07:49:54
|
If you can't find help anywhere else, the matlab documentaiton may be helpful. Most of the matplotlib functions are taken right from there. http://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot.html http://www.mathworks.com/access/helpdesk/help/techdoc/ref/subplot.html http://www.mathworks.com/access/helpdesk/help/techdoc/ref/bar.html --bb On 8/21/06, Derek Hohls <DH...@cs...> wrote: > > The matplotlib philosophy is one of "make easy things easy" - which I > totally agree with. > > I am a new user of matplotlib; and a relatively new Python programmer. > I am trying to produce some bar charts for a colleague, in an attempt to > show how easy it is to do this with Python/matplotlib (as opposed to the > old Excel/cut-n-paste approach!). > > I think I have got the basics OK (two subplots), but I am struggling > with what *I* think should be trivial tasks - such as setting line > widths, font sizes, bar colours etc. The examples do not really seem to > deal with these issues, and in fact the homepage implies these are for a > "power user", which I find strange because these are some of the first > things most users want to "fiddle" with! What I have done as a > temporary fix is alter all the settings in the matplotprc file; but this > is not ideal as these settings affect *all* charts. > > It appears the manual (which I assume might be able to help me) is not > "downloadable". The link : > http://matplotlib.sourceforge.net/users_guide_0.87.1.pdf > results in a 2.41MB PDF file, which Acrobat Reader reports is > "damaged". (I also noticed when running > the download, that the download manager seemed to be expecting a 4.5MB > file?) > > The example: > http://www.scipy.org/Cookbook/Matplotlib/BarCharts > shows how to setup labels for a bar chart - but it would be great if > there was a line-by-line explanation of what each step means; its not > very clear! > > The last point of "mystery" to me is that of "plot" vs "subplot" vs > "bar" - are these all essentially the same family of object, with some > differences in their capabilities - or vastly different beasts? > > Any help with these "newbie" issues would be appreciated! > > Thanks > Derek > > > -- |
|
From: Jouni K S. <jk...@ik...> - 2006-08-21 09:45:34
|
"Derek Hohls" <DH...@cs...> writes: > It appears the manual (which I assume might be able to help me) is not > "downloadable". The link : > http://matplotlib.sourceforge.net/users_guide_0.87.1.pdf For some reason, downloading this file fails quite often. Perhaps it should be distributed using the same sf.net download mechanism as the software itself? Try using some software that knows how to resume interrupted downloads. E.g., run curl -O -C - http://matplotlib.sourceforge.net/users_guide_0.87.1.pdf as many times as needed to get the whole file. > http://www.scipy.org/Cookbook/Matplotlib/BarCharts > shows how to setup labels for a bar chart - but it would be great if > there was a line-by-line explanation of what each step means I think the best way to understand the examples is to start up "ipython -pylab", copy/paste the examples line by line, inspect the resulting objects, get help on the mysterious functions (e.g. type ?gca in ipython to find out what gca does), form hypotheses on what the various steps do, and test the hypotheses with experiments. > setting line widths, font sizes, bar colours etc bar returns a list of Rectangle objects: In [19]: bar([1,2,3], [4,5,6]) Out[19]: [<matplotlib.patches.Rectangle instance at 0x2aaab2f33290>, <matplotlib.patches.Rectangle instance at 0x2aaab2f33200>, <matplotlib.patches.Rectangle instance at 0x2aaab2f33248>] Capture these objects and use getp and setp on them: In [20]: recs = _ In [21]: getp(recs[0]) ... In [22]: setp(recs[0], 'facecolor') facecolor: any matplotlib color - see help(colors) In [23]: help(colors) ... In [24]: setp(recs[0], 'facecolor', 'red') Out[24]: [None] For font sizes you need to get a handle to the relevant Text objects. For axis texts, look at the object returned by gca(): In [36]: setp(getp(gca(), 'yticklabels'), 'fontsize', 18) Most of these settings are easier to do by using keyword arguments of the initial commands: In [38]: bar([1,2,3], [4,5,6], color=['red', 'green', 'blue']) But the getp/setp method is great for tuning the image interactively and learning about what can be customized. -- Jouni |
|
From: <jk...@ik...> - 2006-08-21 11:25:51
|
Hi Derek,
[Copying to matplotlib-users since an archive of this conversation
could be helpful to others in the future.]
On 21.8.2006, at 13.34, Derek Hohls wrote:
> Re the other suggestions you have made. While I appreciate the
> "forming hypothesis" approach is good when venturing into the
> unknown, it does seem a little strange when dealing with a known
> item e.g. software.
But it *is* unknown to the extent that the documentation is
lacking! :-) Also, I think that the plot-customization possibilities
of matplotlib are pretty nicely discoverable (once you know about
getp/setp), and even if the pdf manual listed everything, it would be
easier to use the introspective facilities than look things up in the
manual.
> In your example below, you go from line [21]
> getp(recs[0])
> to line[22]
> setp(recs[0], 'facecolor')
>
> Now, how did you know that there was 'facecolor' property that
> could be set? How would one get a list of all these properties?
The list you want is precisely the output of the getp command. I
elided the output since it is quite long, but I guess I didn't make
it sufficiently clear.
> The other issue is the colour:
> colour=['red', 'green', 'blue'])
> implies I would write:
> colour=['125','125','250']
In hindsight, it was a bad idea on my part to make a barchart of
three bars and color them precisely red, green, and blue... let's try
again:
In [11]:bar(arange(10), cos(arange(10)), color=
['blanchedalmond', 'darkorchid', 'gainsboro', 'honeydew', 'hotpink',
'khaki', 'lavenderblush', 'mintcream', 'peachpuff', 'lemonchiffon']);
So you can give a list of colors to make the bars different colors.
(The color names are from matplotlib.colors.cnames.) If you want to
make everything the same color, give just one color, not a list:
In [12]:figure(); bar([0,1], [3,1], color='lightcoral');
The syntax for shades of gray happens to be a string representing a
number from 0 to 1:
In [13]:figure(); bar([0,1], [3,1], color='0.9');
If you want every bar to have the color with components 125, 125, 250
on a scale of 0..255, use hex notation:
In [14]:figure(); bar([0,1], [3,1], color='#7d7dfa');
--
Jouni
|
|
From: Derek H. <DH...@cs...> - 2006-08-21 13:52:35
|
Jouni
=20
I have now loaded and tried to use iPython.
=20
In some cases the xyz? command gives useful output -
in others, not.
=20
So, if I have=20
ax =3D subplot(111)
Then ax? returns a number of get_ & set_ functions that
are available. So far, so good. But, if I try something
like :
In [9]: ax.set_xlim()?
I get
Object `ax.set_xlim()` not found.
So, I cannot find out more about what setxlim() is meant to
do, or how it works? What I did do was go and look at the
class documentation on-line, and this info is available there.
=20
You suggested:
"The list you want is precisely the output of the getp command."
But for the getp? , I get:
Type: function
Base Class: <type 'function'>
String Form: <function getp at 0x00F67370>
Namespace: Interactive
File: c:\python24\lib\site-packages\matplotlib\artist.py
Definition: getp(o, *args)
Docstring:
Return the value of handle property s
=20
h is an instance of a class, eg a Line2D or an Axes or Text.
if s is 'somename', this function returns
o.get_somename()
getp can be used to query all the gettable properties with getp(o)
Many properties have aliases for shorter typing, eg 'lw' is an
alias for 'linewidth'. In the output, aliases and full property
names will be listed as
property or alias =3D value
eg
linewidth or lw =3D 2
Example:
plot(t,s)
set(gca(), 'xlim', [0,10]) # set the x axis limits
or
plot(t,s)
a =3D gca()
a.set_xlim([0,10]) # does the same
=20=20
(and gca? returns something along the same lines)
=20
Which does *not* intuitively lead me to something like:
xticklines =3D getp(gca(), 'xticklines')
for example??
=20
So - the question is how to get to find the items I need
to set - amongst others, I am still looking for something to=20
size the tick marks; setting those on the bottom X-axis to=20
a specific size, while disabling those on the top X-axis.=20=20
The matplotlabprc file has a clearly labelled line that=20
addresses part of this:
=20
xtick.major.size : 2 # major tick size in points
=20
but of course I would like to do this in code. I am sort of
guessing this has something to do with the Tick class:
http://matplotlib.sourceforge.net/matplotlib.axis.html#Tick=20
but I cannot seem to work with Tick() ??
=20
In addition, I cannot seem to see why some things work one way
and others - seemingly in the "same family" - do not. For example:
xticklabels =3D lab.getp(lab.gca(), 'xticklabels')
works just fine, and allows you set the font size, color etc for
the tick labels, whereas there is no:
lab.getp(lab.gca(), 'ylabel')
even though both appear to be dealing with a similar "thing" (a
Text object)??
=20
***************
=20
I guess that, overall, I have been expecting matplotlib to
have a simple "dot" notation throughout -=20
xaxis.xtick.major.size =3D 2
as this type of notation is readily easy to grasp and use,=20
but this preconception is blocking my grasp of how to use=20
the module 'as is'.
=20
Again, apologies for the repetitive questions, and thanks for
patience in answering them.
=20
Derek
>>> Jouni K Sepp=E4nen <jk...@ik...> 2006/08/21 01:24 PM >>>
Hi Derek,
[Copying to matplotlib-users since an archive of this conversation=20=20
could be helpful to others in the future.]
On 21.8.2006, at 13.34, Derek Hohls wrote:
> Re the other suggestions you have made. While I appreciate the
> "forming hypothesis" approach is good when venturing into the
> unknown, it does seem a little strange when dealing with a known
> item e.g. software.
But it *is* unknown to the extent that the documentation is=20=20
lacking! :-) Also, I think that the plot-customization possibilities=20=20
of matplotlib are pretty nicely discoverable (once you know about=20=20
getp/setp), and even if the pdf manual listed everything, it would be=20=20
easier to use the introspective facilities than look things up in the=20=20
manual.
> In your example below, you go from line [21]
> getp(recs[0])
> to line[22]
> setp(recs[0], 'facecolor')
>
> Now, how did you know that there was 'facecolor' property that
> could be set? How would one get a list of all these properties?
The list you want is precisely the output of the getp command. I=20=20
elided the output since it is quite long, but I guess I didn't make=20=20
it sufficiently clear.
> The other issue is the colour:
> colour=3D['red', 'green', 'blue'])
> implies I would write:
> colour=3D['125','125','250']
In hindsight, it was a bad idea on my part to make a barchart of=20=20
three bars and color them precisely red, green, and blue... let's try=20=20
again:
In [11]:bar(arange(10), cos(arange(10)), color=3D=20
['blanchedalmond', 'darkorchid', 'gainsboro', 'honeydew', 'hotpink',=20=20
'khaki', 'lavenderblush', 'mintcream', 'peachpuff', 'lemonchiffon']);
So you can give a list of colors to make the bars different colors.=20=20
(The color names are from matplotlib.colors.cnames.) If you want to=20=20
make everything the same color, give just one color, not a list:
In [12]:figure(); bar([0,1], [3,1], color=3D'lightcoral');
The syntax for shades of gray happens to be a string representing a=20=20
number from 0 to 1:
In [13]:figure(); bar([0,1], [3,1], color=3D'0.9');
If you want every bar to have the color with components 125, 125, 250=20=20
on a scale of 0..255, use hex notation:
In [14]:figure(); bar([0,1], [3,1], color=3D'#7d7dfa');
--=20
Jouni
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642=20
_______________________________________________
Matplotlib-users mailing list
Mat...@li...=20
https://lists.sourceforge.net/lists/listinfo/matplotlib-users=20
--=20
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
=20
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html=20
=20
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html=20
=20
For electronic copies of the CSIR Copyright, Terms and Conditions and the C=
SIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
Cal...@cs....
This message has been scanned for viruses and dangerous content by MailScan=
ner,=20
and is believed to be clean.
|
|
From: Jouni K S. <jk...@ik...> - 2006-08-22 06:43:14
|
"Derek Hohls" <DH...@cs...> writes:
> In [9]: ax.set_xlim()?
> I get
> Object `ax.set_xlim()` not found.
You need to do ax.set_xlim? without the parentheses.
> You suggested:
> "The list you want is precisely the output of the getp command."
> But for the getp? , I get:
I meant the output of the actual getp command, not its help text. E.g.
In [4]:recs=bar([1,2,3],[4,5,6])
In [5]:getp(recs)
alpha = 1.0
animated = False
...
y = 0.0
zorder = 1
gives you the list of properties settable with setp. Similarly
getp(gca()) gives you a long list of properties, including xticklines.
> The matplotlabprc file has a clearly labelled line that
> addresses part of this:
>
> xtick.major.size : 2 # major tick size in points
>
> but of course I would like to do this in code.
I guess it isn't very obvious how to do this with setp. It is the
markersize property (which has the abbreviation ms):
In [25]:setp(getp(gca(), 'xticklines'), 'ms', 10)
Note that here getp returns a list of objects, and setp sets the
property on every object in the list.
But if you already know what something is called in the matplotlibrc
file, you can set it programmatically:
In [49]:rc('xtick.major', size=5, pad=20)
The rc settings do not affect existing images, so you have to make a
new plot before you see the effect:
In [50]:figure(); bar([1,2,3],[4,5,6])
> I guess that, overall, I have been expecting matplotlib to
> have a simple "dot" notation throughout -
> xaxis.xtick.major.size = 2
The getp/setp methods are part of matplotlib's pylab interface, which
is designed to reproduce Matlab's "handle graphics". There is also an
OO interface, which looks like this (this is the agg_oo.py example
from the examples subdirectory):
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.print_figure('test')
I seem to recall some discussion about making it more Pythonic, e.g.
allowing you to do
ax.title = 'hi mom'
ax.xlabel = 'time'
but I don't know whether it is a high priority for any of the
developers.
--
Jouni
|
|
From: <jk...@ik...> - 2006-08-23 06:53:13
|
[Again copying to matplotlib-users; maybe the main developers can
comment on whether these shortcomings in the getp/setp interface
should be fixed.]
Hi Derek,
> It does seem as those these settings affect the top and bottom of
> the graph - I was wondering if it was possible to show tickmarks
> along the bottom edge but not the top edge?
I don't think that's directly supported. Here's a hacky way to do it:
lines = getp(gca(), 'xticklines')
toplines = [ l for l in lines if getp(l, 'ydata') == (1,) ]
setp(toplines, visible=False)
How I came up with this: I knew that I wanted to make some of the
xticklines invisible, so I looked at the list of line objects for
clues as to what differs between them. They seem to have xdata and
ydata properties, and ydata is (0,) for half of the lines and (1,)
for the other half, so it looks like it is the vertical position in
axis coordinates. (xdata seems to be in data coordinates.)
> And the other property I do not see on the list is the one that
> shows whether a tick goes "into" the graph or just "out" - in the
> prc file, there is a line:
> xtick.direction : in # direction: in or out
> but there is no "direction' property?
You're right, there is no obvious property to control this. Here's an
even hackier way to do this (and one that doesn't look very future-
proof):
for l in getp(gca(), 'xticklines'):
setp(l, 'marker', 5-getp(l, 'marker'))
The line objects have a marker property, which is 2 for some markers
and 3 for the others... so I guessed that one of them means upwards
and the other downwards, and checked this guess by flipping the
xtick.direction parameter and looking again. So subtracting the
marker from 5 flips the direction.
I wonder how this is done in Matlab?
> label: any string
>
> which shows me that the Yaxis has a label - in this case a
> string - but I do not see how one can set the font properties
> for the Yaxis label as it is not Text object??
I think you cannot do this with setp alone. Use the ylabel command:
ylabel('foo bar', fontsize=18)
--
Jouni
|
|
From: Darren D. <dd...@co...> - 2006-08-23 11:24:05
|
On Wednesday 23 August 2006 2:52 am, Jouni K Sepp=E4nen wrote: > [Again copying to matplotlib-users; maybe the main developers can > comment on whether these shortcomings in the getp/setp interface > should be fixed.] > > Hi Derek, > > > It does seem as those these settings affect the top and bottom of > > the graph - I was wondering if it was possible to show tickmarks > > along the bottom edge but not the top edge? from pylab import * a=3Daxes() a.xaxis.tick_bottom() show() |
|
From: Derek H. <dh...@cs...> - 2006-08-25 09:14:23
|
Jouni=20
Wow! A guru at work... this solves all my current problems;
your insights and comments are most appreciated!
To return to my first post - matplotlib aims to make simple things
simple - I would argue that the way tickmarks are currently dealt
with is NOT simple & it would be great to see some simplifications
or additions to the interface to deal with the issues raised in this
thread (for example, by aligning their behaviour and properties to=20
other, similar, chart properties).
Thanks again,
Derek
>>> Jouni K Sepp=E4nen <jk...@ik...> 2006/08/23 08:52 AM >>>
[Again copying to matplotlib-users; maybe the main developers can=20=20
comment on whether these shortcomings in the getp/setp interface=20=20
should be fixed.]
Hi Derek,
> It does seem as those these settings affect the top and bottom of=20=20
> the graph - I was wondering if it was possible to show tickmarks=20=20
> along the bottom edge but not the top edge?
I don't think that's directly supported. Here's a hacky way to do it:
lines =3D getp(gca(), 'xticklines')
toplines =3D [ l for l in lines if getp(l, 'ydata') =3D=3D (1,) ]
setp(toplines, visible=3DFalse)
How I came up with this: I knew that I wanted to make some of the=20=20
xticklines invisible, so I looked at the list of line objects for=20=20
clues as to what differs between them. They seem to have xdata and=20=20
ydata properties, and ydata is (0,) for half of the lines and (1,)=20=20
for the other half, so it looks like it is the vertical position in=20=20
axis coordinates. (xdata seems to be in data coordinates.)
> And the other property I do not see on the list is the one that=20=20
> shows whether a tick goes "into" the graph or just "out" - in the=20=20
> prc file, there is a line:
> xtick.direction : in # direction: in or out
> but there is no "direction' property?
You're right, there is no obvious property to control this. Here's an=20=20
even hackier way to do this (and one that doesn't look very future-=20
proof):
for l in getp(gca(), 'xticklines'):
setp(l, 'marker', 5-getp(l, 'marker'))
The line objects have a marker property, which is 2 for some markers=20=20
and 3 for the others... so I guessed that one of them means upwards=20=20
and the other downwards, and checked this guess by flipping the=20=20
xtick.direction parameter and looking again. So subtracting the=20=20
marker from 5 flips the direction.
I wonder how this is done in Matlab?
> label: any string
>
> which shows me that the Yaxis has a label - in this case a
> string - but I do not see how one can set the font properties
> for the Yaxis label as it is not Text object??
I think you cannot do this with setp alone. Use the ylabel command:
ylabel('foo bar', fontsize=3D18)
--=20
Jouni
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642=20
_______________________________________________
Matplotlib-users mailing list
Mat...@li...=20
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--=20
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
=20
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html=20
=20
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html=20
=20
For electronic copies of the CSIR Copyright, Terms and Conditions and the C=
SIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
Cal...@cs....
This message has been scanned for viruses and dangerous content by MailScan=
ner,=20
and is believed to be clean.
|
|
From: John H. <jdh...@ac...> - 2006-08-29 04:13:33
|
>>>>> "Jouni" =3D=3D Jouni K Sepp=E4nen <jk...@ik...> writes:
Jouni> How I came up with this: I knew that I wanted to make some
Jouni> of the xticklines invisible, so I looked at the list of
Jouni> line objects for clues as to what differs between
Jouni> them. They seem to have xdata and ydata properties, and
Jouni> ydata is (0,) for half of the lines and (1,) for the other
Jouni> half, so it looks like it is the vertical position in axis
Jouni> coordinates. (xdata seems to be in data coordinates.)
Off the top of my head, I didn't remember the answer either. Here's
how I answered it: I opened up lib/matplotlib/axis.py in my local copy
of the mpl src distro and searched for Tick (you could have done the
same by pointing your browser to
http://matplotlib.sourceforge.net/matplotlib.axis.html#Tick) and saw
the following attributes in the docstring
Publicly accessible attributes
tick1line : a Line2D instance
tick2line : a Line2D instance
gridline : a Line2D instance
label1 : a Text instance
label2 : a Text instance
gridOn : a boolean which determines whether to draw the ticklin=
e
tick1On : a boolean which determines whether to draw the 1st tic=
kline
tick2On : a boolean which determines whether to draw the 2nd tic=
kline
label1On : a boolean which determines whether to draw tick label
label2On : a boolean which determines whether to draw tick label
I know, and it should be better documented, that for the x-axis, the
tick1 and label1 designations are for the lower axis, and the tick2
and label2 are for the upper (ditto for left/right for the y-axis).
So tick.tick1line controls the properties for the lower tick, etc.
Thus one can do
for tick in ax.xaxis.get_major_ticks():
tick.tick1line.set_visible(False)
tick.label2.set_color('darkslategray')
As Jouni notes, the documentation could and should be better, but the
underlying concepts are pretty simple. A Figure contains multiple
Axes, each of which contains an XAxis and YAxis. The XAxis and Yaxis
contains XTicks and YTicks, and these contains tick lines (Line2D
instances) and tick labels (Text instances). Each of these upper-case
thingies is a well-documented matplotlib class (this class containment
hierarchy is also documented in the user's guide). For future
reference, the links to the class documentation for each of these is
Figure : http://matplotlib.sourceforge.net/matplotlib.figure.html
Axes/Subplot : http://matplotlib.sourceforge.net/matplotlib.axes.html
XAxis/YAxis : http://matplotlib.sourceforge.net/matplotlib.axis.html
XTick/YTick : http://matplotlib.sourceforge.net/matplotlib.axis.html
Line2D : http://matplotlib.sourceforge.net/matplotlib.lines.html
Text : http://matplotlib.sourceforge.net/matplotlib.text.html
As Jouni notes, setp and getp are a nice way to get quick interactive
access to the configurable properties, but they are also documented in
the class documentation in the links above.
JDH
|