You are viewing an old version of this page. Return to the latest version.
	
	
	
	
	
	
		Version of 06:31, 18 February 2022 by Kaustubh Shivdikar
	
Difference between revisions of "Fancy Plots using Plotly"
 (Fancy Plotly plots page created) (Tag: Visual edit)  | 
				 (Syntax highlight test) (Tag: Visual edit)  | 
				||
| Line 18: | Line 18: | ||
== Line Plots ==  | == Line Plots ==  | ||
| − | <br />  | + | <syntaxhighlight lang="python3">  | 
| + | # x and y given as array_like objects  | ||
| + | import plotly.express as px  | ||
| + | fig = px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16])  | ||
| + | fig.show()  | ||
| + | </syntaxhighlight><br />  | ||
== Scatter Plots ==  | == Scatter Plots ==  | ||
Revision as of 06:33, 18 February 2022
 in a nutshell: elegant plots for adding in to research papers.  | 
- This is a collection of simple plots using the plotly library.
 - It consists of elegant color schemes and easy to ready adjustable fonts.
 - The reason for using plotly is that it allows for HTML plots that can be scaled and zoomed after plotting.
 
Installation
We need the plotly-express library.
Conda
conda install -c plotly plotly_express==0.4.0
conda install -c plotly plotly_express==0.4.0
Pip
pip install plotly_express==0.4.0
Line Plots
# x and y given as array_like objects import plotly.express as px fig = px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16]) fig.show()