You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/python/legend.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ jupyter:
5
5
text_representation:
6
6
extension: .md
7
7
format_name: markdown
8
-
format_version: '1.2'
8
+
format_version: "1.2"
9
9
jupytext_version: 1.3.0
10
10
kernelspec:
11
11
display_name: Python 3
@@ -29,10 +29,12 @@ jupyter:
29
29
name: Legends
30
30
order: 14
31
31
permalink: python/legend/
32
+
redirect_from: python/horizontal-legend/
32
33
thumbnail: thumbnail/legends.gif
33
34
---
34
35
35
36
#### Show Legend
37
+
36
38
By default the legend is displayed on Plotly charts with multiple traces.
37
39
38
40
```python
@@ -240,9 +242,11 @@ fig.update_layout(
240
242
241
243
fig.show()
242
244
```
245
+
243
246
### Size of Legend Items
244
247
245
-
In this example [itemsizing](https://plot.ly/python/reference/#layout-legend-itemsizing) attribute determines the legend items symbols remain constant, regardless of how tiny/huge the bubbles would be in the graph.
248
+
In this example [itemsizing](https://plot.ly/python/reference/#layout-legend-itemsizing) attribute determines the legend items symbols remain constant, regardless of how tiny/huge the bubbles would be in the graph.
Traces corresponding to 2D fields (e.g. `go.Heatmap`, `go.Histogram2d`) or 3D fields (e.g. `go.Isosurface`, `go.Volume`, `go.Cone`) can also appear in the legend. They come with legend icons corresponding to each trace type, which are colored using the same colorscale as the trace.
366
371
367
-
The example below explores a vector field using several traces. Note that you can click on legend items to hide or to select (with a double click) a specific trace. This will make the exploration of your data easier!
372
+
The example below explores a vector field using several traces. Note that you can click on legend items to hide or to select (with a double click) a specific trace. This will make the exploration of your data easier!
Copy file name to clipboardExpand all lines: doc/python/plot-data-from-csv.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ jupyter:
5
5
text_representation:
6
6
extension: .md
7
7
format_name: markdown
8
-
format_version: '1.1'
8
+
format_version: "1.1"
9
9
jupytext_version: 1.2.0
10
10
kernelspec:
11
11
display_name: Python 3
@@ -23,7 +23,7 @@ jupyter:
23
23
version: 3.6.8
24
24
plotly:
25
25
description: How to create charts from csv files with Plotly and Python
26
-
display_as: databases
26
+
display_as: advanced_opt
27
27
has_thumbnail: false
28
28
language: python
29
29
layout: base
@@ -34,7 +34,6 @@ jupyter:
34
34
thumbnail: thumbnail/csv.jpg
35
35
---
36
36
37
-
38
37
CSV or comma-delimited-values is a very popular format for storing structured data. In this tutorial, we will see how to plot beautiful graphs using csv data, and Pandas. We will learn how to import csv data from an external source (a url), and plot it using Plotly and pandas.
39
38
40
39
First we import the data and look at it.
@@ -57,7 +56,6 @@ fig = px.line(df, x = 'AAPL_x', y = 'AAPL_y', title='Apple Share Prices over tim
57
56
fig.show()
58
57
```
59
58
60
-
61
59
### Plot from CSV with `graph_objects`
62
60
63
61
```python
@@ -76,6 +74,6 @@ fig.update_layout(title='Apple Share Prices over time (2014)',
76
74
fig.show()
77
75
```
78
76
79
-
80
77
#### Reference
78
+
81
79
See https://plot.ly/python/getting-started for more information about Plotly's Python API!
Copy file name to clipboardExpand all lines: doc/python/random-walk.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ jupyter:
5
5
text_representation:
6
6
extension: .md
7
7
format_name: markdown
8
-
format_version: '1.1'
8
+
format_version: "1.1"
9
9
jupytext_version: 1.1.1
10
10
kernelspec:
11
11
display_name: Python 3
@@ -23,7 +23,7 @@ jupyter:
23
23
version: 3.6.7
24
24
plotly:
25
25
description: Learn how to use Python to make a Random Walk
26
-
display_as: statistics
26
+
display_as: advanced_opt
27
27
has_thumbnail: false
28
28
language: python
29
29
layout: base
@@ -36,10 +36,8 @@ jupyter:
36
36
37
37
A [random walk](https://en.wikipedia.org/wiki/Random_walk) can be thought of as a random process in which a token or a marker is randomly moved around some space, that is, a space with a metric used to compute distance. It is more commonly conceptualized in one dimension ($\mathbb{Z}$), two dimensions ($\mathbb{Z}^2$) or three dimensions ($\mathbb{Z}^3$) in Cartesian space, where $\mathbb{Z}$ represents the set of integers. In the visualizations below, we will be using [scatter plots](https://plot.ly/python/line-and-scatter/) as well as a colorscale to denote the time sequence of the walk.
38
38
39
-
40
39
#### Random Walk in 1D
41
40
42
-
43
41
The jitter in the data points along the x and y axes are meant to illuminate where the points are being drawn and what the tendancy of the random walk is.
44
42
45
43
```python
@@ -137,6 +135,7 @@ fig.show()
137
135
```
138
136
139
137
#### Advanced Tip
138
+
140
139
We can formally think of a 1D random walk as a point jumping along the integer number line. Let $Z_i$ be a random variable that takes on the values +1 and -1. Let this random variable represent the steps we take in the random walk in 1D (where +1 means right and -1 means left). Also, as with the above visualizations, let us assume that the probability of moving left and right is just $\frac{1}{2}$. Then, consider the sum
141
140
142
141
$$
@@ -164,4 +163,3 @@ $$
164
163
$$
165
164
166
165
Therefore, we expect our random walk to hover around $0$ regardless of how many steps we take in our walk.
Copy file name to clipboardExpand all lines: doc/python/smoothing.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ jupyter:
5
5
text_representation:
6
6
extension: .md
7
7
format_name: markdown
8
-
format_version: '1.1'
8
+
format_version: "1.1"
9
9
jupytext_version: 1.1.1
10
10
kernelspec:
11
11
display_name: Python 3
@@ -23,7 +23,7 @@ jupyter:
23
23
version: 3.6.7
24
24
plotly:
25
25
description: Learn how to perform smoothing using various methods in Python.
26
-
display_as: signal-analysis
26
+
display_as: advanced_opt
27
27
has_thumbnail: false
28
28
language: python
29
29
layout: base
@@ -34,8 +34,8 @@ jupyter:
34
34
thumbnail: /images/static-image
35
35
---
36
36
37
-
38
37
#### Imports
38
+
39
39
The tutorial below imports [NumPy](http://www.numpy.org/), [Pandas](https://plot.ly/pandas/intro-to-pandas-tutorial/), [SciPy](https://www.scipy.org/) and [Plotly](https://plot.ly/python/getting-started/).
40
40
41
41
```python
@@ -49,6 +49,7 @@ from scipy import signal
49
49
```
50
50
51
51
#### Savitzky-Golay Filter
52
+
52
53
`Smoothing` is a technique that is used to eliminate noise from a dataset. There are many algorithms and methods to accomplish this but all have the same general purpose of 'roughing out the edges' or 'smoothing' some data.
53
54
54
55
There is reason to smooth data if there is little to no small-scale structure in the data. The danger to this thinking is that one may skew the representation of the data enough to change its percieved meaning, so for the sake of scientific honesty it is an imperative to at the very minimum explain one's reason's for using a smoothing algorithm to their dataset.
0 commit comments