File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ 2015-10-21 Added get_ticks_direction()
2
+
1
3
2015-02-27 Added the rcParam 'image.composite_image' to permit users
2
4
to decide whether they want the vector graphics backends to combine
3
5
all images within a set of axes into a single composite image.
Original file line number Diff line number Diff line change @@ -1244,6 +1244,28 @@ def get_ticklocs(self, minor=False):
1244
1244
return self .minor .locator ()
1245
1245
return self .major .locator ()
1246
1246
1247
+ def get_ticks_direction (self , minor = False ):
1248
+ """
1249
+ Get the tick directions as a numpy array
1250
+
1251
+ Parameters
1252
+ ----------
1253
+ minor : boolean
1254
+ True to return the minor tick directions,
1255
+ False to return the major tick directions,
1256
+ Default is False
1257
+
1258
+ Returns
1259
+ -------
1260
+ numpy array of tick directions
1261
+ """
1262
+ if minor :
1263
+ return np .array (
1264
+ [tick ._tickdir for tick in self .get_minor_ticks ()])
1265
+ else :
1266
+ return np .array (
1267
+ [tick ._tickdir for tick in self .get_major_ticks ()])
1268
+
1247
1269
def _get_tick (self , major ):
1248
1270
'return the default tick instance'
1249
1271
raise NotImplementedError ('derived must override' )
You can’t perform that action at this time.
0 commit comments