Skip to content

Commit 2a7712f

Browse files
Update vonMisesDist.py
1 parent cbc2a98 commit 2a7712f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

data/vonMisesDist.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111

1212
fig = plt.figure(figsize=(12,6),facecolor='#9F9F9F')
1313

14+
# Create a custom formatter for the x and y axis ticks
1415
formatter = FuncFormatter(lambda x, pos: "{:.1f}".format(x))
1516

17+
# Create a grid of 2x4 subplots and place the subplots in the grid
1618
spec = gridspec.GridSpec(ncols=4,
1719
nrows=2,
1820
figure=fig)
@@ -22,14 +24,16 @@
2224
x = np.random.vonmises(mu, kappa, 1000)
2325
y = x**3 + np.random.vonmises(mu, kappa, 1000)
2426

27+
# Plot the samples using a scatter plot
2528
ax1 = fig.add_subplot(spec[0, 0:3], facecolor='#9F9F9F')
2629
ax1.plot(x,y,
2730
linestyle='None',
2831
marker='.',
2932
alpha=0.5,
3033
color='#E8C16D')
31-
ax1.tick_params(axis='x', colors='#C6C8CB')
32-
ax1.tick_params(axis='y', colors='#C6C8CB')
34+
ax1.tick_params(axis='x', colors='#C6C8CB') # Set the color of the x-axis ticks
35+
ax1.tick_params(axis='y', colors='#C6C8CB') # Set the color of the y-axis ticks
36+
# Set the color of the spines
3337
for spine in 'bottom', 'left', 'top', 'right':
3438
ax1.spines[spine].set_color('#C6C8CB')
3539

0 commit comments

Comments
 (0)