Matlibplot doubt

How to increase spacing between x-axis and y-axis
and size of graph ?

Capu

Hey @Ajitverma1503, you can increase figure size by using this command
plt.figure(figsize=(20 10))

On the other hand you can set limit for x axis and y axis independently,
xlim(left, right) # set the xlim to left, right
ylim(left, right)

Hope this cleared your doubt.
Plz mark doubt as resolved in my depth :blush:

please give some idea to make the look better for above graph .
i want to increase the spacing of ticks in x axis.

Hey @Ajitverma1503, here is one of the example try running it for your graph

plt.figure(figsize= (20,20))
plt.xlim(20,2000) #set your values
plt.ylim(1,500) #set your values here
plt.plot(x,y)
plt.show()

Hope now your doubt is resolved. You can plot your graph with above lines on you system. I think so now your doubt is resolved, and plz mark the doubt as resolved in my doubts section. :blush:


it look like this…
on x - axis everything is messed up.

Hey @Ajitverma1503, try this out
plt.figure(figsize= (20,20))
plt.xlim(20,2000) #set your values
plt.ylim(1,500) #set your values here
plt.xticks(rotation = 90)
plt.plot(x,y)
plt.show()

Thank you :slight_smile:

Hey @Ajitverma1503, you are requested to close the doubt in my doubts section. :blush:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.