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

Skip to content

Commit baf9f6a

Browse files
committed
DOC: a bit more about ticks
1 parent 5797574 commit baf9f6a

1 file changed

Lines changed: 35 additions & 12 deletions

File tree

doc/users/dflt_style_changes.rst

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -691,14 +691,6 @@ Shading
691691
Formerly, it was ``hsv``.
692692

693693

694-
695-
696-
TEMPORARY NOTES TOM IS KEEPING IN THE SOURCE SO THEY DO NOT GET LOST
697-
====================================================================
698-
699-
- lines.color change, only hits raw usage of Line2D
700-
701-
702694
Plot layout
703695
===========
704696

@@ -728,7 +720,7 @@ porcupine.
728720
with mpl.rc_context(rc=rcparams):
729721

730722
ax = fig.add_subplot(2, 2, j)
731-
ax.hist(np.random.beta(0.5, 0.5, 10000), 100, normed=True)
723+
ax.hist(np.random.beta(0.5, 0.5, 10000), 25, normed=True)
732724
ax.set_xlim([0, 1])
733725
ax.set_title(title)
734726

@@ -741,15 +733,39 @@ porcupine.
741733
'ytick.right': True
742734
}
743735

744-
fig = plt.figure(figsize=(4, 4), tight_layout=True)
736+
fig = plt.figure(figsize=(6, 6), tight_layout=True)
745737

746738

747739

748740
demo(fig, classic, 'classic', 1)
749741
demo(fig, {}, 'v2.0', 2)
750742

751-
Number
752-
~~~~~~
743+
744+
To restore the previous behavior set::
745+
746+
mpl.rcParams['xtick.direction'] = 'in'
747+
mpl.rcParams['ytick.direction'] = 'in'
748+
mpl.rcParams['xtick.top'] = True
749+
mpl.rcParams['ytick.right'] = True
750+
751+
or set::
752+
753+
xtick.top: True
754+
xtick.direction: in
755+
756+
ytick.right: True
757+
ytick.direction: in
758+
759+
in your :file:`matplotlibrc` file.
760+
761+
762+
763+
Number of ticks
764+
~~~~~~~~~~~~~~~
765+
766+
The default `~matplotlib.ticker.Locator` used for the x and y axis is
767+
`~matplotlib.ticker.AutoLocator` which tries to find, up to some
768+
maximum number, 'nicely' spaced ticks.
753769

754770
- The number of ticks on an axis is now automatically determined based
755771
on the length of the axis.
@@ -807,3 +823,10 @@ mplot3d
807823
- grid.color
808824
- grid.linewidth
809825
- grid.linestyle
826+
827+
828+
829+
TEMPORARY NOTES TOM IS KEEPING IN THE SOURCE SO THEY DO NOT GET LOST
830+
====================================================================
831+
832+
- lines.color change, only hits raw usage of Line2D

0 commit comments

Comments
 (0)