<jupyter_start><jupyter_text>New to Plotly?Plotly's Python library is free and open source! [Get started](https://plotly.com/python/getting-started/) by downloading the client and [reading the primer](https://plotly.com/python/getting-started/).You can set up Plotly to work in [online](https://plotly.com/python/getting-started/initialization-for-online-plotting) or [offline](https://plotly.com/python/getting-started/initialization-for-offline-plotting) mode, or in [jupyter notebooks](https://plotly.com/python/getting-started/start-plotting-online).We also have a quick-reference [cheatsheet](https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf) (new!) to help you get started!!  Compare WebGL and SVGCheckout [this notebook](https://plotly.com/python/compare-webgl-svg) to compare WebGL and SVG scatter plots with 75,000 random data points  WebGL with 100,000  points<jupyter_code>import plotly.plotly as py
import plotly.graph_objs as go

import numpy as np

N = 100000
trace = go.Scattergl(
    x = np.random.randn(N),
    y = np.random.randn(N),
    mode = 'markers',
    marker = dict(
        line = dict(
            width = 1, 
            color = '#404040')
    )
)
data = [trace]
py.iplot(data, filename='WebGL100000')<jupyter_output><empty_output><jupyter_text>WebGL with 1 Million Points<jupyter_code>import plotly.plotly as py
import plotly.graph_objs as go

import numpy as np

N = 1000000
trace = go.Scattergl(
    x = np.random.randn(N),
    y = np.random.randn(N),
    mode = 'markers',
    marker = dict(
        color = 'rgb(152, 0, 0)',
        line = dict(
            width = 1,
            color = 'rgb(0,0,0)')
    )
)
data = [trace]
py.iplot(data, filename='WebGLmillion')<jupyter_output><empty_output><jupyter_text>WebGL with many traces<jupyter_code>import plotly.plotly as py
import plotly.graph_objs as go

import numpy as np

data = []
trace_num = 10
point_num = 5000
for i in range(trace_num):
    data.append(go.Scattergl(
        x = np.linspace(0, 1, point_num),
        y = np.random.randn(point_num)+(i*5)
    )
)
layout = dict(showlegend=False)
fig=dict(data=data, layout=layout)
py.iplot(fig, filename='WebGL_line')<jupyter_output><empty_output><jupyter_text>Reference See https://plotly.com/python/reference/scattergl for more information and chart attribute options!<jupyter_code>from IPython.display import display, HTML

display(HTML('<link href="//fonts.googleapis.com/css?family=Open+Sans:600,400,300,200|Inconsolata|Ubuntu+Mono:400,700" rel="stylesheet" type="text/css" />'))
display(HTML('<link rel="stylesheet" type="text/css" href="http://help.plot.ly/documentation/all_static/css/ipython-notebook-custom.css">'))

! pip install git+https://github.com/plotly/publisher.git --upgrade
import publisher
publisher.publish(
    'webgl.ipynb', 'python/webgl-vs-svg/', 'Python WebGL vs SVG | plotly',
    'Implement WebGL for increased speed, improved interactivity, and the ability to plot even more data!',
    title = 'Python WebGL vs SVG | plotly',
    name = 'WebGL vs SVG',
    has_thumbnail='true', thumbnail='thumbnail/webgl.jpg', 
    language='python', 
    display_as='basic', order=0.5,
    ipynb= '~notebook_demo/44')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13568773234200743, 'fraction_numerical': 0.024163568773234202, 'mean_word_length': 4.408710217755444, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '273422', 'license': 'CC-BY-3.0', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1098, 'n_words': 245, 'path': '_posts/python-v3/basic/WebGL/webgl.ipynb', 'repo_name': 'arauzo/graphing-library-docs', 'size': '3228'}