from
matplotlib.axis
import
Axis
import
numpy as np
import
matplotlib.pyplot as plt
fig
=
plt.figure()
x
=
np.linspace(
-
np.pi, np.pi,
100
)
y
=
2
*
np.sin(x)
ax
=
fig.add_subplot()
ax.set_title(
'Spines at data (3, 2)'
)
ax.plot(x, y)
ax.spines[
'left'
].set_position((
'data'
,
3
))
ax.spines[
'right'
].set_color(
'none'
)
ax.spines[
'bottom'
].set_position((
'data'
,
2
))
ax.spines[
'top'
].set_color(
'none'
)
ax.spines[
'left'
].set_smart_bounds(
True
)
ax.spines[
'bottom'
].set_smart_bounds(
True
)
ax.xaxis.set_ticks_position(
'bottom'
)
ax.yaxis.set_ticks_position(
'left'
)
ax.grid()
fig.suptitle(
, fontweight
=
"bold")
plt.show()