File tree 2 files changed +20
-3
lines changed 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change
1
+ 2006-02-13 Added twiny to pylab - JDH
2
+
1
3
2006-02-12 Moved data files into lib/matplotlib so that setuptools'
2
4
develop mode works. Re-organized the mpl-data layout so
3
5
that this source structure is maintained in the
4
6
installation. (I.e. the 'fonts' and 'images'
5
7
sub-directories are maintained in site-packages.) Suggest
6
8
removing site-packages/matplotlib/mpl-data and
7
- ~/.matplotlib/ttffont.cache before installing
8
-
9
- - ADS
9
+ ~/.matplotlib/ttffont.cache before installing - ADS
10
10
11
11
2006-02-07 Committed Rob Hetland's patch for qt4: remove
12
12
references to text()/latin1(), plus some improvements
Original file line number Diff line number Diff line change @@ -1029,6 +1029,23 @@ def twinx(ax=None):
1029
1029
return ax2
1030
1030
1031
1031
1032
+ def twiny (ax = None ):
1033
+ """
1034
+ Make a second axes overlay ax (or the current axes if ax is None)
1035
+ sharing the yaxis. The ticks for ax2 will be placed on the top,
1036
+ and the ax2 instance is returned.
1037
+ """
1038
+ if ax is None :
1039
+ ax = gca ()
1040
+
1041
+
1042
+ ax2 = gcf ().add_axes (ax .get_position (), sharey = ax , frameon = False )
1043
+ ax2 .xaxis .tick_top ()
1044
+ ax2 .xaxis .set_label_position ('top' )
1045
+ ax .xaxis .tick_bottom ()
1046
+ draw_if_interactive ()
1047
+ return ax2
1048
+
1032
1049
def title (s , * args , ** kwargs ):
1033
1050
"""
1034
1051
Set the title of the current axis to s
You can’t perform that action at this time.
0 commit comments