@@ -22,13 +22,13 @@ def plot_scatter(ax, prng, nb_samples=100):
22
22
def plot_colored_sinusoidal_lines (ax ):
23
23
"""Plot sinusoidal lines with colors following the style color cycle.
24
24
"""
25
- L = 2 * np .pi
25
+ L = 2 * np .pi
26
26
x = np .linspace (0 , L )
27
27
nb_colors = len (plt .rcParams ['axes.prop_cycle' ])
28
28
shift = np .linspace (0 , L , nb_colors , endpoint = False )
29
29
for s in shift :
30
30
ax .plot (x , np .sin (x + s ), '-' )
31
- ax .margins ( 0 )
31
+ ax .set_xlim ([ x [ 0 ], x [ - 1 ]] )
32
32
return ax
33
33
34
34
@@ -57,7 +57,7 @@ def plot_colored_circles(ax, prng, nb_samples=15):
57
57
radius = 1.0 , color = sty_dict ['color' ]))
58
58
# Force the limits to be the same across the styles (because different
59
59
# styles may have different numbers of available colors).
60
- ax .set_xlim ([- 4 , 7 ])
60
+ ax .set_xlim ([- 4 , 8 ])
61
61
ax .set_ylim ([- 5 , 6 ])
62
62
ax .set_aspect ('equal' , adjustable = 'box' ) # to plot circles as circles
63
63
return ax
@@ -70,6 +70,9 @@ def plot_image_and_patch(ax, prng, size=(20, 20)):
70
70
ax .imshow (values , interpolation = 'none' )
71
71
c = plt .Circle ((5 , 5 ), radius = 5 , label = 'patch' )
72
72
ax .add_patch (c )
73
+ # Remove ticks
74
+ ax .set_xticks ([])
75
+ ax .set_yticks ([])
73
76
74
77
75
78
def plot_histograms (ax , prng , nb_samples = 10000 ):
0 commit comments