Skip to content

Commit f5e16f6

Browse files
authored
Merge branch 'master' into cmid_zmid_py_
2 parents c524fe9 + 032e463 commit f5e16f6

File tree

202 files changed

+775
-779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+775
-779
lines changed

apidoc/_static/logo.png

-1.54 KB
Loading

apidoc/_static/plotly-style.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.navbar-default {
2+
background-color: #00004f;
3+
}
4+
.navbar {
5+
min-height: 75px;
6+
}
7+
.navbar-brand {
8+
font-family: "Open Sans", sans-serif;
9+
padding: 10px 10px;
10+
}
11+
.body {
12+
font-family: "Open Sans", sans-serif;
13+
}
14+
.navbar-brand img {
15+
height: 30px;
16+
margin-top: 4px;
17+
}
18+
19+
.navbar .container {
20+
padding-top: 8px;
21+
}
22+
23+
a {
24+
color: #2391fe !important;
25+
}
26+
27+
code {
28+
color: #2c3e50 !important;
29+
}
30+
31+
.alert-info {
32+
background: lightgrey;
33+
}
34+
35+
36+
.dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus {
37+
background: lightgrey;
38+
}

apidoc/_templates/class_figure.rst

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,28 @@
44

55
.. currentmodule:: {{ module }}
66

7-
.. autoclass:: {{ objname }}
7+
.. autosummary::
8+
:toctree: generated/
9+
10+
Figure
811

12+
Figure.show
13+
Figure.add_traces
14+
Figure.update_traces
15+
Figure.update_layout
16+
17+
18+
.. autoclass:: {{ objname }}
919
{% block methods %}
1020
.. automethod:: __init__
11-
.. automethod:: show
12-
.. automethod:: update_layout
13-
.. automethod:: add_traces
1421
{% endblock %}
1522

16-
Other methods
17-
{{ underline }}==============
18-
19-
.. autosummary::
20-
:toctree: generated/
21-
22-
plotly.graph_objects.{{ objname }}
2323

24+
.. autoclass:: {{ objname }}
25+
:members:
26+
:inherited-members:
2427

2528
.. raw:: html
2629

2730
<div class="clearer"></div>
31+

apidoc/_templates/layout.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{# Import the theme's layout. #}
2+
{% extends "!layout.html" %}
3+
4+
{%- block footer %}
5+
<script type="text/javascript">
6+
7+
var _gaq = _gaq || [];
8+
_gaq.push(['_setAccount', 'UA-39373211-1']);
9+
_gaq.push(['_setDomainName', 'none']);
10+
_gaq.push(['_setAllowLinker', true]);
11+
_gaq.push(['_trackPageview']);
12+
13+
(function() {
14+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
15+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
16+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
17+
})();
18+
19+
</script>
20+
{%- endblock %}
21+

apidoc/_templates/trace.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:mod:`{{module}}`.{{objname}}
2-
{{ underline }}
2+
{{ underline }}============================
33

44

55
.. currentmodule:: {{ module }}
@@ -12,10 +12,9 @@
1212

1313

1414
:mod:`{{module}}`.{{objname.lower()}}
15-
{{ underline }}
15+
{{ underline }}================================
1616

1717
.. autosummary::
18-
:toctree: generated/
1918

2019
plotly.graph_objects.{{ objname.lower() }}
2120

apidoc/conf.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
#
1515
import os
1616
import sys
17-
17+
import sphinx_bootstrap_theme
1818
# sys.path.insert(0, os.path.abspath("../packages/python/plotly"))
1919

2020

2121
# -- Project information -----------------------------------------------------
2222

23-
project = "plotly"
23+
project = ""
2424
copyright = "2019, plotly team"
2525
author = "plotly team"
2626

@@ -87,18 +87,18 @@
8787
# The theme to use for HTML and HTML Help pages. See the documentation for
8888
# a list of builtin themes.
8989
#
90-
html_theme = "alabaster"
90+
html_theme = "bootstrap"
91+
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
9192

93+
html_logo='_static/logo.png'
9294
# Theme options are theme-specific and customize the look and feel of a theme
9395
# further. For a list of options available for each theme, see the
9496
# documentation.
9597
#
9698
html_theme_options = {
97-
#'nosidebar': True,
98-
'analytics_id':'UA-39373211-1',
99-
'logo':'logo.png',
100-
'page_width': '70%',
101-
'sidebar_width':'20%'
99+
'analytics_id':'UA-39373211-1', # not supported by this theme
100+
'bootswatch_theme': "flatly",
101+
'source_link_position': "no"
102102
}
103103

104104
# Add any paths that contain custom static files (such as style sheets) here,
@@ -203,3 +203,6 @@
203203

204204
# If true, `todo` and `todoList` produce output, else they produce nothing.
205205
todo_include_todos = True
206+
207+
def setup(app):
208+
app.add_stylesheet("plotly-style.css") # also can be a full URL

apidoc/figure.rst

Lines changed: 0 additions & 21 deletions
This file was deleted.

apidoc/index.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
plotly API reference
6+
Python API reference for `plotly`
77
====================
88

99
This is the reference of plotly's API. Also see `plotly's documentation website <https://plot.ly/python>`_.
@@ -12,23 +12,23 @@ Submodules
1212
----------
1313

1414

15-
* :ref:`Plotly express <px>`
16-
* :ref:`Graph objects: figures, traces and layout <graph-objects>`
17-
* :ref:`Subplots <subplots>`
18-
* :ref:`Figure Factory <ff>`
19-
* :ref:`I/O <io>`
15+
* :ref:`Plotly Express: high-level interface for data visualization <px>`
16+
* :ref:`Graph Objects: low-level interface to figures, traces and layout <graph-objects>`
17+
* :ref:`Subplots: helper function for layout out multi-plot figures <subplots>`
18+
* :ref:`Figure Factories: helper methods for building specific complex charts <ff>`
19+
* :ref:`I/O: low-level interface for displaying, reading and writing figures <io>`
2020

2121
Full reference list
2222
-------------------
2323

2424
.. toctree::
2525
:maxdepth: 3
2626

27-
px.rst
28-
graph_objects.rst
29-
subplots.rst
30-
figure_factory.rst
31-
io.rst
27+
plotly.express.rst
28+
plotly.graph_objects.rst
29+
plotly.subplots.rst
30+
plotly.figure_factory.rst
31+
plotly.io.rst
3232

3333

3434

apidoc/px.rst renamed to apidoc/plotly.express.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _px:
22

3-
Plotly express: `plotly.express`
3+
`plotly.express`: high-level interface for data visualization
44
================================
55

66
The `plotly.express <https://plot.ly/python/plotly-express/>`_ module is
@@ -39,6 +39,7 @@ plotly's high-level API for rapid figure generation. ::
3939
choropleth
4040
density_contour
4141
density_heatmap
42+
imshow
4243

4344

4445

apidoc/figure_factory.rst renamed to apidoc/plotly.figure_factory.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _ff:
22

3-
Figure Factory
3+
`plotly.figure_factory`: helper methods for building specific complex charts
44
==============
55

66
.. currentmodule:: plotly.figure_factory
@@ -23,6 +23,6 @@ Figure Factory
2323
create_streamline
2424
create_table
2525
create_ternary_contour
26-
create_trisurf
26+
create_trisurf
2727
create_violin
2828

apidoc/graph_objects.rst renamed to apidoc/plotly.graph_objects.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _graph-objects:
22

3-
Graph objects: figures, traces and layout
3+
`plotly.graph_objects`: low-level interface to figures, traces and layout
44
=========================================
55

66
.. currentmodule:: plotly.graph_objects
@@ -11,11 +11,14 @@ Graph objects: figures, traces and layout
1111

1212
>>> import plotly.graph_objects as go
1313

14-
.. toctree::
15-
:maxdepth: 1
16-
:caption: Figure:
14+
Figure
15+
------
16+
17+
.. autosummary::
18+
:toctree: generated/
19+
:template: class_figure.rst
1720

18-
figure.rst
21+
Figure
1922

2023

2124
Layout
@@ -41,6 +44,7 @@ Simple charts
4144
Bar
4245
Pie
4346
Heatmap
47+
Image
4448
Contour
4549
Table
4650

@@ -55,7 +59,7 @@ Distributions
5559
Violin
5660
Histogram
5761
Histogram2d
58-
Histogram2dcontour
62+
Histogram2dContour
5963

6064
Finance
6165
-------

apidoc/io.rst renamed to apidoc/plotly.io.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _io:
22

3-
I/O
3+
`plotly.io`: low-level interface for displaying, reading and writing figures
44
==============
55

66
.. currentmodule:: plotly.io
@@ -23,5 +23,5 @@ I/O
2323
show
2424

2525
.. automodule:: plotly.io
26-
:members:
26+
:no-members:
2727

apidoc/subplots.rst renamed to apidoc/plotly.subplots.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _subplots:
22

3-
Subplots: `plotly.subplots`
3+
`plotly.subplots`: helper function for laying out multi-plot figures
44
===========================
55

66
.. currentmodule:: plotly.subplots

python/2D-Histogram.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ jupyter:
2424
plotly:
2525
description: How to make 2D Histograms in Python with Plotly.
2626
display_as: statistical
27-
has_thumbnail: true
28-
ipynb: ~notebook_demo/24
2927
language: python
3028
layout: base
3129
name: 2D Histograms

python/2d-histogram-contour.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ jupyter:
2424
plotly:
2525
description: How to make 2D Histogram Contour plots in Python with Plotly.
2626
display_as: statistical
27-
has_thumbnail: true
28-
ipynb: ~notebook_demo/199
2927
language: python
3028
layout: base
3129
name: 2D Histogram Contour

python/3d-axes.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,17 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.6.7
23+
version: 3.7.3
2424
plotly:
2525
description: How to format axes of 3d plots in Python with Plotly.
2626
display_as: 3d_charts
27-
has_thumbnail: true
28-
ipynb: ~notebook_demo/96
2927
language: python
3028
layout: base
3129
name: 3D Axes
3230
order: 0.101
3331
page_type: example_index
3432
permalink: python/3d-axes/
3533
thumbnail: thumbnail/3d-axes.png
36-
v4upgrade: true
3734
---
3835

3936
### Range of axes
@@ -210,3 +207,25 @@ fig.update_layout(scene = dict(
210207
)
211208
fig.show()
212209
```
210+
211+
### Disabling tooltip spikes
212+
213+
By default, guidelines originating from the tooltip point are drawn. It is possible to disable this behaviour with the `showspikes` parameter. In this example we only keep the `z` spikes (projection of the tooltip on the `x-y` plane). Hover on the data to show this behaviour.
214+
215+
```python
216+
import plotly.graph_objects as go
217+
import numpy as np
218+
219+
N = 50
220+
fig = go.Figure(data=[go.Mesh3d(x=(30*np.random.randn(N)),
221+
y=(25*np.random.randn(N)),
222+
z=(30*np.random.randn(N)),
223+
opacity=0.5,)])
224+
fig.update_layout(scene=dict(xaxis_showspikes=False,
225+
yaxis_showspikes=False))
226+
fig.show()
227+
```
228+
229+
```python
230+
231+
```

0 commit comments

Comments
 (0)