Get current axis via plt.gca()
, and then set its limits:
ax = plt.gca()
ax.set_xlim([xmin, xmax])
ax.set_ylim([ymin, ymax])
More Related Contents:
- Fixing x axis scale and autoscale y axis
- Plotting time on the independent axis
- Rotate label text in seaborn
- yaxis range display using absolute values rather than offset values
- Aligning y-ticks to the left
- Remove axis label offset by default
- Plot a function in python
- Modify tick label text
- How to animate a scatter plot
- why is plotting with Matplotlib so slow?
- Matplotlib xticks not lining up with histogram
- How to equalize the scales of x-axis and y-axis in matplotlib
- What is the difference between pylab and pyplot? [duplicate]
- matplotlib – extracting data from contour lines
- How to plot a histogram using Matplotlib in Python with a list of data?
- Plot correlation matrix using pandas
- Pyplot: vertical gradient fill under curve?
- How to space overlapping annotations
- Dynamically serving a matplotlib image to the web using python
- automatically position text box in matplotlib
- matplotlib axis label format
- How can I display text over columns in a bar chart in matplotlib?
- Matplotlib animation inside your own GUI
- split tick labels or wrap tick labels [duplicate]
- Plotting errors bars from dataframe using Seaborn FacetGrid
- How to change the color of the axis, ticks and labels
- Changing the color of an axis
- Problem in combining bar plot and line plot
- Image overlay in 3d plot
- Plot all pandas dataframe columns separately