Reputation: 9149
I have such a piece of code for generating two plots in jupyter notebook
:
plt.figure(figsize=(5, 4))
x = np.arange(10)
plt.subplot(2, 1, 1)
plt.plot(x, x)
plt.subplot(2, 1, 2)
plt.plot(x, x)
How can I add black lines that go along axes?
Like this one:
Upvotes: 0
Views: 36
Reputation: 40747
You seem to be using the darkgrid
theme of seaborn.
You want to use to tick
style instead.
sns.set_style("ticks")
See Controlling figure aesthetics
Upvotes: 2
Reputation:
Change the following rcParams by adding the following lines to the code:
plt.rcParams['axes.spines.left'] = True
plt.rcParams['axes.spines.bottom'] = True
plt.rcParams['axes.spines.top'] = True
plt.rcParams['axes.spines.right'] = True
Upvotes: 1