Anny G
Anny G

Reputation: 179

How to increase the physical size of axes in matplotlib pyplot?

I am plotting the following graph, Graph plotted

I would like to change the physical size of the axes. I have plotted the xticks in hopes of being able to increase the spacing between them and thus increase the physical size of the axes, but no luck. I want a resulting image, that is possibly very large, but when zoomed in, I am able to see individual points and the arrows plotted. I tried changing the size of the figure, but it just creates a larger image, with higher resolution, and same level of detail as before, it does not allow me to see more points when I zoom in.

Can someone please tell me how can I increase the physical size of the axes so when I zoom in on the saved image (right now I'm saving it in a pdf format) I can see individual points? Thanks so much

Upvotes: 1

Views: 11936

Answers (1)

ml4294
ml4294

Reputation: 2629

You could try plt.figure(figsize=(20, 10)) in order to increase the width of the figure. It should be possible to obtain a suitable ratio of height and width by playing with these numbers (20=width, 10=height). There is a similar question here: How do you change the size of figures drawn with matplotlib?

Upvotes: 6

Related Questions