Folks, Continuing to experiment with exactly how to do these notes Ryan May, Eric Firing, Thomas Caswell, Nelle Varoquaux ** [[mpl:8032]] - Nelle suggests we replace dots with _actually_ dotted (round dots) - Eric points out it was never super dotted Conclusions: - get rid of clipping - make the 'dotted' pattern square - adjust the rest of the patterns to scale for dropping clipping - make sure all default patterns are commensurate (2 '--' to 4 ':' to 1 '-.') Other comments - merge the loosening of the `grid.linestyle` rcparam to accept dash patterns for 2.0.1 - merge the 'loose' version of patterns for 2.1 - can get 'true dotted' with =dash_capstyle = 'round'= + =[.000001, 1.5]= as the dash pattern ** code for playing with dash patterns #+BEGIN_SRC python import matplotlib.pyplot as plt from cycler import cycler plt.ion() fig, ax = plt.subplots() patterns = cycler('dashes', [(1, 1), (1.1, 1.1), (1, 2), (1, 3)]) * cycler('lw', [1, 1.5, 2, 3, 7, 10]) plt.rcParams['lines.dash_capstyle'] = 'butt' for j, m in enumerate(patterns): ax.plot([0, 1], [100 - j, 100 - j], **m, label=(str(m))) ax.legend() #+END_SRC #+BEGIN_SRC python import matplotlib.pyplot as plt from cycler import cycler plt.ion() fig, ax = plt.subplots() patterns = cycler('lw', [1, 1.5, 2, 3, 7, 10]) * cycler('linestyle', ['--', ':', '-.']) plt.rcParams['lines.dash_capstyle'] = 'butt' for j, m in enumerate(patterns): ax.plot([0, 1], [100 - j, 100 - j], **m, label=(str(m))) ax.legend() #+END_SRC
participants (1)
-
Thomas Caswell