Skip to content

Commit 1b6dbb6

Browse files
committed
Cosmeticks tweaks
1 parent d2b5b2c commit 1b6dbb6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

examples/style_sheets/style_sheets_reference.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ def plot_scatter(ax, prng, nb_samples=100):
2222
def plot_colored_sinusoidal_lines(ax):
2323
"""Plot sinusoidal lines with colors following the style color cycle.
2424
"""
25-
L = 2*np.pi
25+
L = 2 * np.pi
2626
x = np.linspace(0, L)
2727
nb_colors = len(plt.rcParams['axes.prop_cycle'])
2828
shift = np.linspace(0, L, nb_colors, endpoint=False)
2929
for s in shift:
3030
ax.plot(x, np.sin(x + s), '-')
31-
ax.margins(0)
31+
ax.set_xlim([x[0], x[-1]])
3232
return ax
3333

3434

@@ -57,7 +57,7 @@ def plot_colored_circles(ax, prng, nb_samples=15):
5757
radius=1.0, color=sty_dict['color']))
5858
# Force the limits to be the same across the styles (because different
5959
# styles may have different numbers of available colors).
60-
ax.set_xlim([-4, 7])
60+
ax.set_xlim([-4, 8])
6161
ax.set_ylim([-5, 6])
6262
ax.set_aspect('equal', adjustable='box') # to plot circles as circles
6363
return ax
@@ -70,6 +70,9 @@ def plot_image_and_patch(ax, prng, size=(20, 20)):
7070
ax.imshow(values, interpolation='none')
7171
c = plt.Circle((5, 5), radius=5, label='patch')
7272
ax.add_patch(c)
73+
# Remove ticks
74+
ax.set_xticks([])
75+
ax.set_yticks([])
7376

7477

7578
def plot_histograms(ax, prng, nb_samples=10000):

0 commit comments

Comments
 (0)