Web tools like D3.js and WebGL let you make beautiful, interactive 2D and 3D graphs. You can now publish graphs and dashboards with these technologies using Python, R, MATLAB, & Excel. Publishing and sharing is one extra line of code. This post puts you on your way, no downloads or installations required.
Interactive R and ggplot2 plots
Plotly’s open-source ggplot2 figure converter draws an online version of the image below with one line of code. Click and drag to zoom, hover your mouse to see data, and press the legend to toggle traces on and off.
install.packages("devtools") # so we can install from github library("devtools") install_github("ropensci/plotly") library(plotly) py <- plotly(username="r_user_guide", key="mw5isa4yqp") # plotly connection c <- ggplot(mtcars, aes(qsec, wt)) c + stat_smooth() + geom_point() py$ggplotly() # call plotly
Interactive matplotlib and Python plots
We can similarly transform static matplotlib graphs into web-based, interactive graphs. See our IPython Notebook tutorial for the code. You can also interactively plot with pandas, ggplot2 for Python, prettyplotlib, and Seaborn. Then embed in websites, deploy a dashboard with plots, set your plots to update, or embed IPython widgets.
Interactive 3D MATLAB graphs
Our MATLAB figure converter works the same way. That is, make a MATLAB figure, add a line of code to make an interactive graph. Install the converter here; see our user guide to learn more and start streaming your data.
fig = figure; [X,Y] = meshgrid(-8:.5:8); R = sqrt(X.^2 + Y.^2) + eps; Z = sin(R)./R; surf(Z) p = fig2plotly(fig);
Wrapping It All Together
You can easily share your plots, data, and interactive figures with others who need to view or edit with you. Share plots publicly via URL or privately with collaborators. We can make 3D graphs with Python and R and convert Excel graphs into online graphs. For sensitive data, try Plotly On-Premise to power your collaboration.