Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

horizontal line matplotlib python

import matplotlib.pyplot as plt
plt.axhline(0)
Comment

horizontal line for pyplot

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(1, 21, 200)
y = np.exp(-x)

fig, ax = plt.subplots()
ax.plot(x, y)
ax.hlines(y=0.2, xmin=4, xmax=20, linewidth=2, color='r')

plt.show()
Comment

plot horizontal line in python

This will plot y=0 horizontal line , 
import matplotlib.pyplot as plt
plt.axhline(0)
Comment

python plot horizontal line

import matplotlib.pyplot as plt
series.plot(kind='barh')
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: python get date file last modified 
Python :: save dictionary python 
Python :: update tensorflow pip 
Python :: django versatileimagefield 
Python :: python loop through files in directory recursively 
Python :: install mamba conda 
Python :: correlation between lists python 
Python :: django makemigrations comand 
Python :: python url join 
Python :: python cv2 screen capture 
Python :: python os if file exists 
Python :: tqdm for jupyter notebook 
Python :: pygame change logo 
Python :: print image python 
Python :: keras import optimizer adam 
Python :: pandas change dtype to string 
Python :: how to rewrite minute in datetime python 
Python :: bgr2gray opencv 
Python :: python access index in for loop 
Python :: python most common element in list 
Python :: knn sklearn 
Python :: count nan pandas 
Python :: python pil invert image color 
Python :: discord.py dm specific user 
Python :: squared sum of all elements in list python 
Python :: set index to column pandas 
Python :: copy text python 
Python :: python read gzipped file 
Python :: opencv grayscale to rgb 
Python :: remove None pandas 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =