Skip to content

Commit 48111d0

Browse files
committed
The new matplotlib hierarchy
svn path=/trunk/matplotlib/; revision=7
0 parents  commit 48111d0

File tree

6 files changed

+263
-0
lines changed

6 files changed

+263
-0
lines changed

CHANGELOG

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2002-12-10 - Added a TODO file and CHANGELOG. Lots to do -- get
2+
crackin'!
3+
4+
- Fixed y zoom tool bug
5+
6+
- Adopted a compromise fix for the y data clipping problem.
7+
The problem was that for solid lines, the y data clipping
8+
(as opposed to the gc clipping) caused artifactual
9+
horizontal solid lines near the ylim boundaries. I did a
10+
5% offset hack in Axes set_ylim functions which helped,
11+
but didn't cure the problem for very high gain y zooms.
12+
So I disabled y data clipping for connected lines . If
13+
you need extensive y clipping, either plot(y,x) because x
14+
data clipping is always enabled, or change the _set_clip
15+
code to 'if 1' as indicated in the lines.py src. See
16+
_set_clip in lines.py and set_ylim in figure.py for more
17+
information.
18+
19+
20+
2002-12-11 - Added a measurement dialog to the figure window to
21+
measure axes position and the delta x delta y with a left
22+
mouse drag. These defaults can be overridden by deriving
23+
from Figure and overrriding button_press_event,
24+
button_release_event, and motion_notify_event,
25+
and _dialog_measure_tool.
26+
27+
- fixed the navigation dialog so you can check the axes the
28+
navigation buttons apply to.
29+
30+
31+
32+
2003-04-23 Released matplotlib v0.1
33+
34+
2003-04-24 Added a new line style PixelLine2D which is the plots the
35+
markers as pixels (as small as possible) with format
36+
symbol ','
37+
38+
Added a new class Patch with derived classes Rectangle,
39+
RegularPolygon and Circle
40+
41+
2003-04-25 Implemented new functions errorbar, scatter and hist
42+
43+
Added a new line type '|' which is a vline. syntax is
44+
plot(x, Y, '|') where y.shape = len(x),2 and each row gives
45+
the ymin,ymax for the respective values of x. Previously I
46+
had implemented vlines as a list of lines, but I needed the
47+
efficientcy of the numeric clipping for large numbers of
48+
vlines outside the viewport, so I wrote a dedicated class
49+
Vline2D which derives from Line2D
50+
51+
52+

INSTALL

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
This package requires python 2.2+, Numeric and pygtk 1.99.x (which
2+
requires gnome2).
3+
4+
If these dependencies are satisfied, just do the usual thing:
5+
6+
> python setup.py install
7+
8+
I have installed and tested this on linux and win32, but in theory it
9+
should run anywhere that Numeric and pygtk run.
10+
11+
Take a look at the scripts in the demo dir for examples of how to use
12+
matplotlib.
13+
14+
If you have any questions, email me at
15+
John Hunter <jdhunter@ace.bsd.uchicago.edu> or post to
16+
comp.lang.python, which I read frequently.

LICENSE

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
LICENSE AGREEMENT FOR MATPLOTLIB 0.01
2+
--------------------------------------
3+
4+
1. This LICENSE AGREEMENT is between the John D. Hunter ("JDH"), and
5+
the Individual or Organization ("Licensee") accessing and otherwise
6+
using matplotlib software in source or binary form and its associated
7+
documentation.
8+
9+
2. Subject to the terms and conditions of this License Agreement, JDH
10+
hereby grants Licensee a nonexclusive, royalty-free, world-wide
11+
license to reproduce, analyze, test, perform and/or display publicly,
12+
prepare derivative works, distribute, and otherwise use matplotlib
13+
0.01 alone or in any derivative version, provided, however, that JDH's
14+
License Agreement and JDH's notice of copyright, i.e., "Copyright (c)
15+
2002 John D. Hunter; All Rights Reserved" are retained in matplotlib
16+
0.01 alone or in any derivative version prepared by Licensee.
17+
18+
3. In the event Licensee prepares a derivative work that is based on
19+
or incorporates matplotlib 0.01 or any part thereof, and wants to make
20+
the derivative work available to others as provided herein, then
21+
Licensee hereby agrees to include in any such work a brief summary of
22+
the changes made to matplotlib 0.01.
23+
24+
4. JDH is making matplotlib 0.01 available to Licensee on an "AS IS"
25+
basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
26+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND
27+
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
28+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 0.01 WILL NOT
29+
INFRINGE ANY THIRD PARTY RIGHTS.
30+
31+
5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF
32+
MATPLOTLIB 0.01 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES
33+
OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING
34+
MATPLOTLIB 0.01, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE
35+
POSSIBILITY THEREOF.
36+
37+
6. This License Agreement will automatically terminate upon a material
38+
breach of its terms and conditions.
39+
40+
7. Nothing in this License Agreement shall be deemed to create any
41+
relationship of agency, partnership, or joint venture between JDH and
42+
Licensee. This License Agreement does not grant permission to use JDH
43+
trademarks or trade name in a trademark sense to endorse or promote
44+
products or services of Licensee, or any third party.
45+
46+
8. By copying, installing or otherwise using matplotlib 0.01, Licensee
47+
agrees to be bound by the terms and conditions of this License
48+
Agreement.
49+

README

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
INTRODUCTION:
2+
3+
This is a gtk based python plotting library which makes a faint
4+
attempt at emulating matlab style plot commands. The src is divided
5+
into 2 parts, located in the src dir. matplotlib.py is the plotting
6+
lib which does the heavy lifting, and matplot.py defines some
7+
functions to give a matlab style functional interface to the plot
8+
lib, which is suitable for use from the interactive prompt.
9+
10+
REQUIREMENTS:
11+
12+
python 2.2+, pygtk-1.99.x and Numeric
13+
14+
INSTALL
15+
16+
If you have the requirements, just do 'python setup.py install'
17+
18+
EXAMPLES
19+
20+
See the demos in the demo dir.
21+
22+
AUTHOR
23+
24+
John D. Hunter <jdhunter@ace.bsd.uchicago.edu>
25+
Copyright (c) 2002 John D. Hunter; All Rights Reserved
26+
27+
LICENSE
28+
29+
Based on that of python 2.2. See the LICENSE file that ships with
30+
the matplotlib source code
31+

TODO

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
-- add print/save functionality. Currently you can save by right
2+
clicking on the fig window, but you must have nothing in front of
3+
the window. I suppose I need to first draw to a pixbuf. I would
4+
also like to control the resolution.
5+
6+
DONE: just need to make a GUI to set size and fname
7+
8+
-- fix text size calculations using pango layouts: DONE
9+
10+
-- add a font selection dialog for the axis text
11+
12+
-- enable vertical rendering for ylabels: DONE
13+
14+
-- enable anti aliasing for fonts: DONE with pango
15+
16+
-- enable fancy text labels (eg, greek letters, math symbols,
17+
superscripts) ala TeX or unicode
18+
19+
-- add a color selection dialog for the background, lines, and text
20+
21+
-- allow interactive control of the plot from the python shell after
22+
it has been launched using the cookbook thread recipe.
23+
24+
-- write a user guide
25+
26+
-- allow more intelligent choice of tick labels and locs when panning and
27+
zooming.
28+
29+
-- figure out why the positioning of dialog boxes based on position
30+
and size of main window and dialog window doesn't work exactly as
31+
expected. For example, the width of the dialog box is being
32+
reported as being much smaller than it is. Is window pixels the
33+
unit being returned by for gtk.Dialogs.get_size? Also, this isn't
34+
working cross platform. According to the docs this is better
35+
handled using size hints -- but I don't know how to use them, yet.
36+
37+
38+
-- vlines and hlines disappear on in some instance due to improper
39+
clipping
40+
41+
-- One the errorbar demo the hlines do not always appear symmetric
42+
about the x values. Is there an tranformation or rounding problem
43+
occurring somewhere?
44+
45+
-- Clip patches outside view port
46+
47+
-- Here's a list of things the remaining things I think need to be
48+
done before publication quality (2D) is achieved
49+
50+
1) Display fonts vertically (ylabel). Arbitrary orientations would
51+
be nicer and would be matlab mimic the matlab handle rotation
52+
for text.
53+
54+
Update: vertical text support and ylabel added 2003-05-01
55+
56+
2) Arbitrary locs for axis text
57+
58+
3) Legend
59+
60+
4) Fix ytick bug where grid and tick show outside axis viewport
61+
62+
DONE 2003-05-01 with gc clip
63+
64+
5) Allow text to scale for high res prints
65+
66+
6) Support multiple output resolutions and formats:
67+
68+
Updates: Added support for png and jpeg. 2003-05-01 Gdk-Pixbufs
69+
can support more types, but apparently pygtk only supports these
70+
2. This may be GTK or pygtk build dependent.
71+
72+
7) Fix the script time render time inconsitencies (like axis lim
73+
autoscalig which occurs at rendering and is not available during
74+
script
75+
76+
8) Allow interactive control of plot thru threading
77+
78+
9) Support a richer char set for labeling, eg greek letters, as
79+
well as sub and superscripts
80+
81+
10) Support log scaling
82+
83+
84+
-- Allow background color to be set for subplots
85+
86+
-- Expose bug on win32 for axis text
87+
88+
-- Fix floating point bug on panx/pany where 0 is computed as 5e-17
89+
90+
-- fmt process bug on this kind of plot command (2nd of 3 has no
91+
format string)
92+
93+
plot(t1, p1, 'o', t2, p2, ogtt.times, ogtt.cpeptide, 's')
94+
95+
-- xlabel is lower than it needs to be
96+

setup.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from distutils.core import setup
2+
import sys,os
3+
4+
5+
setup(name="matplotlib",
6+
version= '0.2b',
7+
description = "Matlab style plotting lib using pygtk",
8+
author = "John D. Hunter",
9+
author_email="jdhunter@ace.bsd.uchicago.edu",
10+
url = "http://nitace.bsd.uchicago.edu:8080/matplotlib",
11+
long_description = """
12+
matplotlib strives to produce publication quality 2D graphics
13+
using matlab plotting for inspiration. Although the main lib is
14+
object oriented, there is a functional matlab style interface
15+
for people coming from matlab.
16+
""",
17+
packages=['matplotlib'],
18+
platforms='any',
19+
)

0 commit comments

Comments
 (0)