|
[Matplotlib-users] normal x-y axes without a box
From: David Pine <dp82@ny...> - 2010-11-30 08:49
|
Is there a simple way to make a plot with axes that look like those in test1.png rather than like those in test.png? Here is the code that produced test.png. Thanks.
Dave Pine
import numpy as np
import matplotlib.pyplot as plt
t = np.linspace(0., 20., 100)
y = np.sin(t)
fig = plt.figure(1, figsize=(6,3) )
fig.subplots_adjust(bottom=0.2)
ax = fig.add_subplot(1,1,1)
ax.plot(t, y)
ax.set_xlabel('t')
ax.set_ylabel('y')
plt.savefig('test.png')
plt.show()
|
| Thread | Author | Date | |
|---|---|---|---|
| [Matplotlib-users] normal x-y axes without a box | David Pine <dp82@ny...> |
|