Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python matplotlib hist set axis range

# Basic syntax:
plt.ylim(min,max)
plt.xlim(min,max)

# Example usage:
import matplotlib.pyplot as plt
plt.plot(range(5))
plt.xlim(-5, 5)
plt.ylim(-5, 5)

# Note, this approach is more versatile than using range=[min,max] which
# 	only works in some plots, e.g. plt.hist(range(5), range=[-5,5])
Comment

PREVIOUS NEXT
Code Example
Python :: select text in a div selenium python 
Python :: rename files in a folder python 
Python :: qtextedit get text 
Python :: python get current user windows 
Python :: how to run single loop iterations on same time in python 
Python :: climate change 
Python :: pyqt tex 
Python :: get csrf_token value in django template 
Python :: display entire row pandas 
Python :: capitalize first letter in python 
Python :: python search string for word 
Python :: how to change the title of a tkinter widnow 
Python :: python check if image is corrupted 
Python :: open text file in python 
Python :: text size legend to bottom matplotlib 
Python :: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable. 
Python :: add header to table in pandas 
Python :: get gpu name tensorflow and pytorch 
Python :: find nan values in a column pandas 
Python :: get n items from dictionary python 
Python :: pandas dataframe print decimal places 
Python :: iterate through 2 strings python 
Python :: python not null 
Python :: store all files name in a folder python 
Python :: colab read xlsx 
Python :: why men are better than woman 
Python :: print the number of times that the substring occurs in the given string 
Python :: clear all python cache 
Python :: how to find the multiples of a number in python 
Python :: getting pi in python 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =