When writing graphs in python, what library do you use?
matpltlib ? seaborn ? etc., but this time I'll introduce Plotly, which is one of the most recommended!
What is Plotly ?
Plotly is a data visualization library that supports languages such as Python, R, Matlab, Julia, Ruby, Go, and more!
What's more, unlike matplotlib and seaborn, you can manipulate graphs intuitively! In particular, I will show you how to use it with a demo later. 具体的には、この後デモでもを交えて紹介しますが、
① Just by hovering the cursor over a plot on the graph, you can see the information of that point or line !
② You can zoom in/out and specify the range of the graph using the GUI!
official HP : https://plotly.com/python/
In this article, we will introduce how to use it in Python.
How to install Plotly ?
pip install plotly
import plotly.graph_objects as go
Plot a quadratic function !
fig = go.Figure(data=[ go.Scatter(x=[0,1,2,3,4], y=[0,1,4,9,16]), ]) fig.show()
In this post, I've included a quick rundown of how to use Plotly, along with some useful pointers!
As a sequel, I've put together a list of graphs you can draw with Plotly, so I hope you'll take a look at that as well!