Closed deemo-zheng closed 1 year ago
Hello! Thanks for your contirbutions. I have a problem about saving the picture when I drawing a picture of ieee style.
When I use the code following, it can‘t save the figure.
with plt.style.context(['science', 'ieee']): fig, ax = plt.subplots() ax.plot(axis_x, y_ads[i, :], label='EDA') ax.plot(axis_x, y_ztcnn[i, :], label='S-TCNN') ax.plot(axis_x, y_cnn[i, :], label='CNN') ax.set_xlabel('Frequency (Hz)') ax.set_ylabel(r'Impedance ($\Omega$)') ax.set_xscale('log') ax.set_yscale('log') ax.legend() plt.ylim(5e-5, 4) plt.savefig("./paper_need/No." + str(i) + '.svg', dpi=600, bbox_inches='tight')
It would have a error : "FileNotFoundError: missing font metrics file: rsfs10"
But when I use the code following, it can save.
It seems like that the code "plt.savefig()" can't bellow the code "with plt.style.context()".
This is an issue with your Latex installation -- not with the SciencePlots package.
See: https://stackoverflow.com/questions/50875637/matplotlib-how-do-i-have-to-provide-font-metrics-files-for-rendering-text-by-te
Thanks! I have solved this issue.
Hello! Thanks for your contirbutions. I have a problem about saving the picture when I drawing a picture of ieee style.
When I use the code following, it can‘t save the figure.
It would have a error : "FileNotFoundError: missing font metrics file: rsfs10"
But when I use the code following, it can save.
It seems like that the code "plt.savefig()" can't bellow the code "with plt.style.context()".