Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

add horizontal line plotly

import plotly.express as px

df = px.data.iris()
fig = px.scatter(df, x="petal_length", y="petal_width")
fig.add_vline(x=2.5, line_width=3, line_dash="dash", line_color="green")
fig.add_hrect(y0=0.9, y1=2.6, line_width=0, fillcolor="red", opacity=0.2)
fig.show()
Comment

PREVIOUS NEXT
Code Example
Python :: python dockerfile 
Python :: sklearn mean square error 
Python :: how to separate string in python by blank line 
Python :: ver todas linhas dataframe pandas 
Python :: random from list python 
Python :: using regex validators in django models 
Python :: python open file exception 
Python :: convert 1 digit to 2 digit python 
Python :: python get time milliseconds 
Python :: how to sort in pandas 
Python :: draw bounding box on image python cv2 
Python :: how to switch python version in ubuntu 
Python :: random select algo 
Python :: python get minute from datetime 
Python :: how to find and replace all the punctuation in python strings 
Python :: remove base from terminal anaconda 
Python :: add favicon fastapi 
Python :: python filter in ailst 
Python :: python get command line arguments 
Python :: how to see the functions of a library in python 
Python :: Function to a button in tkinter 
Python :: mnist fashion dataset 
Python :: seaborn set title 
Python :: link python3 to python3.7 
Python :: no limit row pandas 
Python :: sklearn version 
Python :: ndarray to list 
Python :: how to check if a network port is open 
Python :: how to cnovert a decimal to fraction python 
Python :: which python mac 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =