.set_xticks()
on the axes will set the locations and set_xticklabels()
will set the displayed text.
def test(axes):
axes.bar(x,y)
axes.set_xticks(x)
axes.set_xticklabels([i+100 for i in x])
More Related Contents:
- Plotting time in Python with Matplotlib
- How can I plot separate Pandas DataFrames as subplots?
- Plotting with seaborn using the matplotlib object-oriented interface
- Heatmap in matplotlib with pcolor?
- Histogram Matplotlib
- matplotlib: overlay plots with different scales?
- How to create a density plot in matplotlib?
- How can I remove the top and right axis in matplotlib?
- prevent plot from showing in jupyter notebook
- How to display a 3D plot of a 3D array isosurface in matplotlib mplot3D or similar?
- matplotlib.pyplot will not forget previous plots – how can I flush/refresh?
- custom matplotlib plot : chess board like table with colored cells
- 3D animation using matplotlib
- How do you plot a vertical line on a time series plot in Pandas?
- Updating z data on a surface_plot in Matplotlib animation
- How do I tell Matplotlib to create a second (new) plot, then later plot on the old one?
- Center origin in matplotlib
- Plotting pandas timedelta
- How can plot Artists be reused (Line2D)?
- Emulating deprecated seaborn distplots
- MatPlotLib: Multiple datasets on the same scatter plot
- How to specify legend position in matplotlib in graph coordinates
- How do I use matplotlib autopct?
- Add colorbar to existing axis
- How do I work with images in Bokeh (Python)
- matplotlib share x axis but don’t show x axis tick labels for both, just one
- how to turn on minor ticks only on y axis matplotlib
- How to store an image in a variable
- Save plot to image file instead of displaying it
- How to find the intersection of two graphs