Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 15556ab

Browse files
committed
ticks, dates, and more
svn path=/trunk/matplotlib/; revision=1862
1 parent 0ef95a5 commit 15556ab

30 files changed

Lines changed: 1519 additions & 1030 deletions

API_CHANGES

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
12
API Changes in matplotlib-0.85
23

4+
Made xtick and ytick separate props in rc
5+
6+
made pos=None the default for tick formatters rather than 0 to
7+
indicate "not supplied"
8+
9+
Removed "feature" of minor ticks which prevents them from
10+
overlapping major ticks. Often you want major and minor ticks at
11+
the same place, and can offset the major ticks with the pad. This
12+
could be made configurable
13+
314
Changed the internal structure of contour.py to a more OO style.
415
Calls to contour or contourf in axes.py or pylab.py now return
516
a ContourSet object which contains references to the

CHANGELOG

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@
1111
new SpanSelector supports horizontal and vertical span
1212
selection, and the appropriate min/max is returned. - CM
1313

14+
2005-11-16 Added a maxdict item to cbook to prevent caches from
15+
growing w/o bounds
16+
17+
2005-11-09 added axisbelow attr for Axes to determine whether ticks and such
18+
are above or below the actors
19+
20+
2005-11-08 Added lineprops dialog for gtk
21+
22+
2005-11-03 Added FIFOBuffer class to mlab to support real time feeds
23+
and examples/fifo_buffer.py
24+
1425
2005-11-01 Contributed Nickolas Young's patch for afm mathtext to
1526
support mathtext based upon the standard postscript Symbol
1627
font when ps.usetex = True.

examples/customize_rc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def set_pub():
3333

3434
# the axes attributes need to be set before the call to subplot
3535
rc('font', weight='bold')
36-
rc('tick.major', size=5, pad=7)
37-
rc('tick', labelsize=15)
36+
rc('xtick.major', size=5, pad=7)
37+
rc('xtick', labelsize=15)
3838

3939
# using aliases for color, linestyle and linewith; gray, solid, thick
4040
rc('grid', c=0.5, ls='-', lw=5)

examples/embedding_in_gtk2.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@
33
show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget and
44
a toolbar to a gtk.Window
55
"""
6-
6+
import pygtk
7+
pygtk.require('2.4')
78
import gtk
89

910
from matplotlib.axes import Subplot
1011
from matplotlib.figure import Figure
1112
from matplotlib.numerix import arange, sin, pi
1213

1314
# uncomment to select /GTK/GTKAgg/GTKCairo
14-
#from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
15-
from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
15+
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
16+
#from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
1617
#from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as FigureCanvas
1718

1819
# or NavigationToolbar for classic
19-
#from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as NavigationToolbar
20-
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar
20+
from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as NavigationToolbar
21+
#from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar
2122

2223

2324
win = gtk.Window()
@@ -38,8 +39,6 @@
3839

3940
canvas = FigureCanvas(fig) # a gtk.DrawingArea
4041
vbox.pack_start(canvas)
41-
42-
4342
toolbar = NavigationToolbar(canvas, win)
4443
vbox.pack_start(toolbar, False, False)
4544

examples/simple_plot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
ylabel('voltage (mV)')
1111
title('About as simple as it gets, folks')
1212
grid(True)
13-
savefig('simple_plot.png')
14-
savefig('simple_plot.ps')
13+
#savefig('simple_plot.png')
14+
#savefig('simple_plot.ps')
1515

1616
show()

lib/matplotlib/__init__.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -667,13 +667,21 @@ def __call__(self, s):
667667
'polaraxes.grid' : [True, validate_bool], # display polar grid or not
668668

669669
# tick properties
670-
'tick.major.size' : [5, validate_float], # major tick size in points
671-
'tick.minor.size' : [2, validate_float], # minor tick size in points
672-
'tick.major.pad' : [3, validate_float], # distance to label in points
673-
'tick.minor.pad' : [3, validate_float], # distance to label in points
674-
'tick.color' : ['k', validate_color], # color of the tick labels
675-
'tick.labelsize' : ['small', validate_fontsize], # fontsize of the tick labels
676-
'tick.direction' : ['in', str], # direction of ticks
670+
'xtick.major.size' : [5, validate_float], # major xtick size in points
671+
'xtick.minor.size' : [2, validate_float], # minor xtick size in points
672+
'xtick.major.pad' : [3, validate_float], # distance to label in points
673+
'xtick.minor.pad' : [3, validate_float], # distance to label in points
674+
'xtick.color' : ['k', validate_color], # color of the xtick labels
675+
'xtick.labelsize' : ['small', validate_fontsize], # fontsize of the xtick labels
676+
'xtick.direction' : ['in', str], # direction of xticks
677+
678+
'ytick.major.size' : [5, validate_float], # major ytick size in points
679+
'ytick.minor.size' : [2, validate_float], # minor ytick size in points
680+
'ytick.major.pad' : [3, validate_float], # distance to label in points
681+
'ytick.minor.pad' : [3, validate_float], # distance to label in points
682+
'ytick.color' : ['k', validate_color], # color of the ytick labels
683+
'ytick.labelsize' : ['small', validate_fontsize], # fontsize of the ytick labels
684+
'ytick.direction' : ['in', str], # direction of yticks
677685

678686
'grid.color' : ['k', validate_color], # grid color
679687
'grid.linestyle' : [':', str], # dotted

0 commit comments

Comments
 (0)