GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Javascript (v4.1.1)
  • Python (v7.1.0)
  • R
  • Julia
  • Javascript (v4.1.1)
  • ggplot2
  • MATLAB
  • F#
  • Download Studio
  • Studio and Cloud Pricing
  • Dash Enterprise Pricing
  • Getting Started
  • Is Plotly Free?
  • Figure Reference

This view

  • Original page
  • New address

GeezerVison is showing plotly.com — Getting started in JavaScript

Quick Reference
On This Page
View open positions at Plotly.

NPM

You can install Plotly.js from NPM via npm install plotly.js-dist or yarn add plotly.js-dist

plotly.js CDN

You can also use the ultrafast plotly.js CDN link. This CDN is graciously provided by the incredible team at Fastly.

<head>
               <script src="https://cdn.plot.ly/plotly-4.1.1.min.js" charset="utf-8"></script>
</head>
plotly-latest.js and plotly-latest.min.js are no longer the latest releases of Plotly.js. They are legacy bundles frozen at v1.58.5 (July 2021) and will not be updated. Use an explicit version number as shown above to get the most recent release.

Download

Download the minified plotly.js source code and dependencies.

Include the downloaded scripts before the end of the </head> tag in your HTML document:

<head>
	<script src="plotly-4.1.1.min.js" charset="utf-8"></script>
</head>

Download plotly.js

Start plotting!

In your HTML document, create an empty DIV to draw the graph in:

<div id="tester" style="width:600px;height:250px;"></div>

Now you can make interactive plotly.js charts using Plotly.newPlot().

<script>
	TESTER = document.getElementById('tester');
	Plotly.newPlot( TESTER, [{
	x: [1, 2, 3, 4, 5],
	y: [1, 2, 4, 8, 16] }], {
	margin: { t: 0 } } );
</script>

Now you can pass Plotly.newPlot() either the ID of the DIV ("tester") or the DIV DOM element (TESTER).

Hello World Example

more examples
Distribution powered by
Fastly
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.