Pages

Matplotlib y-axis label not displayed when saved as .eps .pdf file

I encountered this error in matplotlib.pyplot.

When I tried to save the plotted graph in matplotlib, the y-axis label was not displayed in the saved file (.eps, .pdf, etc files).

Just add this line (as a previous line) before saving the graph as a file using savefig command.

plt.tight_layout()

The problem will be solved and the saved file will contain y-axis label.


No comments:

Post a Comment

You may be interested in these posts

Error in image file conversion: convert-im6.q16: not authorized `test.eps' @ error/constitute.c/WriteImage/1037.

This error is because of the vulnerability. This allows remote execution of code using image formats. So, some Linux distributions by defaul...