1 Upvote
Setting Axis Range on a Matplotlib Chart
Here we set the axis range to 40-52 for the X axis, 0-4000 for the primary y axis and 0-1200 for the secondary y axis.
ax.set_xlim(40,52) #Set range of X axis ax.set_ylim(0,4000) # Set range of primary y axis ax2.set_ylim(0,1200) # Set range of secondary y axis
By analyseup - Last Updated Jan. 12, 2022, 12:32 a.m.
COMMENTS
RELATED SNIPPETS
5
3
3
Labelled Correlation Heatmap Using Seaborn
Python
Visualisation & EDA
3
3
How to Return the Most Frequent Bigrams from Text Using NLTK
Python
Visualisation & EDA
2
2
1
1
Creating a Frequency Table from a Dataframe Column
Python
Visualisation & EDA
1
Find Snippets by Language
Find Snippets by Use