matplotlib outputs a method to save an image of a specified size

  • 2020-09-16 07:33:06
  • OfStack

In fact, this problem is caused by too many horizontal coordinates of the author, and the generated figure frame is too small, resulting in the overlapping of coordinates, and the output pictures need to be saved in batches, so we can't elongate the pictures every time

So a sentence is added before the plot drawing

plt.figure(figsize=(10, 5)) 

The graph changes hhh

And then I stumbled across an api subgraph which is an subplot property. Interesting. Share


And then the opening quote

import matplotlib.pyplt as plt

Then plt.savefig (" 123.png ") is done, so save it before show 2333

Related articles: