268
268
269
269
ax.axis["top", "right"].toggle(ticklabels=True)
270
270
271
- Note that ' ax.axis["top", "right"]' returns a simple proxy object that
271
+ Note that `` ax.axis["top", "right"]`` returns a simple proxy object that
272
272
translate above code to something like below. ::
273
273
274
274
for n in ["top", "right"]:
288
288
289
289
1. Changing tick locations and label.
290
290
291
- Same as the original Matplotlib's axes. ::
291
+ Same as the original Matplotlib's axes::
292
292
293
293
ax.set_xticks([1, 2, 3])
294
294
308
308
ax.axis[:].major_ticklabels.set_color("r")
309
309
310
310
4. To change the tick size (length), you need to use
311
- axis.major_ticks.set_ticksize method. To change the direction of
312
- the ticks (ticks are in opposite direction of ticklabels by
313
- default), use axis.major_ticks.set_tick_out method.
311
+ axis.major_ticks.set_ticksize method. To change the direction of
312
+ the ticks (ticks are in opposite direction of ticklabels by
313
+ default), use axis.major_ticks.set_tick_out method.
314
314
315
- To change the pad between ticks and ticklabels, use
316
- axis.major_ticklabels.set_pad method.
315
+ To change the pad between ticks and ticklabels, use
316
+ axis.major_ticklabels.set_pad method.
317
317
318
- To change the pad between ticklabels and axis label,
319
- axis.label.set_pad method.
318
+ To change the pad between ticklabels and axis label,
319
+ axis.label.set_pad method.
320
320
321
321
Rotation and Alignment of TickLabels
322
322
====================================
451
451
So, in summary,
452
452
453
453
* AxisArtist's methods
454
- * set_axis_direction: "left", "right", "bottom", or "top"
455
- * set_ticklabel_direction: "+" or "-"
456
- * set_axislabel_direction: "+" or "-"
457
- * invert_ticklabel_direction
454
+
455
+ - set_axis_direction: "left", "right", "bottom", or "top"
456
+ - set_ticklabel_direction: "+" or "-"
457
+ - set_axislabel_direction: "+" or "-"
458
+ - invert_ticklabel_direction
459
+
458
460
* Ticks' methods (major_ticks and minor_ticks)
459
- * set_tick_out: True or False
460
- * set_ticksize: size in points
461
+
462
+ - set_tick_out: True or False
463
+ - set_ticksize: size in points
464
+
461
465
* TickLabels' methods (major_ticklabels and minor_ticklabels)
462
- * set_axis_direction: "left", "right", "bottom", or "top"
463
- * set_rotation: angle with respect to the reference direction
464
- * set_ha and set_va: see below
466
+
467
+ - set_axis_direction: "left", "right", "bottom", or "top"
468
+ - set_rotation: angle with respect to the reference direction
469
+ - set_ha and set_va: see below
470
+
465
471
* AxisLabels' methods (label)
466
- * set_axis_direction: "left", "right", "bottom", or "top"
467
- * set_rotation: angle with respect to the reference direction
468
- * set_ha and set_va
472
+
473
+ - set_axis_direction: "left", "right", "bottom", or "top"
474
+ - set_rotation: angle with respect to the reference direction
475
+ - set_ha and set_va
469
476
470
477
Adjusting ticklabels alignment
471
478
------------------------------
@@ -615,8 +622,8 @@ def inv_tr(x, y):
615
622
* No easy way to support a user customized tick location (for
616
623
curvilinear grid). A new Locator class needs to be created.
617
624
618
- * FloatingAxis may have coordinate limits, e.g., a floating axis of x
619
- = 0, but y only spans from 0 to 1.
625
+ * FloatingAxis may have coordinate limits, e.g., a floating axis of x = 0,
626
+ but y only spans from 0 to 1.
620
627
621
628
* The location of axislabel of FloatingAxis needs to be optionally
622
629
given as a coordinate value. ex, a floating axis of x=0 with label at y=1
0 commit comments