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+
132015-02-27 Added the rcParam 'image.composite_image' to permit users
24 to decide whether they want the vector graphics backends to combine
35 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):
12441244 return self .minor .locator ()
12451245 return self .major .locator ()
12461246
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+
12471269 def _get_tick (self , major ):
12481270 'return the default tick instance'
12491271 raise NotImplementedError ('derived must override' )
You can’t perform that action at this time.
0 commit comments