proplot icon indicating copy to clipboard operation
proplot copied to clipboard

save_PNG format

Open hnyoBus opened this issue 2 years ago • 0 comments

import proplot as pplt
import numpy as np
fig, ax= pplt.subplots(nrows=4, ncols=1, space=0, refwidth="5cm", refaspect=(5, 1))

x = np.linspace(0,2*np.pi,50)
y = np.sin(x)

for i in range(4):
    ax[i].plot(x,y, label = "sin")

ax.format(
grid = False,
yticks=[],

)
ax[0].legend(fontsize = 5, title = "my sin", titlefontsize = 5) # titlefontsize is OK, while fontsize = 10 seem not work ??
fig.save("ppro_sin.png", dpi=300, transparent =True) # when save with transparent , all the xticks would apear?

hnyoBus avatar Jul 26 '22 14:07 hnyoBus