Skip to content

Commit b095f89

Browse files
cleanup
1 parent 2bb9144 commit b095f89

File tree

6 files changed

+23
-94
lines changed

6 files changed

+23
-94
lines changed

Diff for: doc/python/horizontal-legend.md

-77
This file was deleted.

Diff for: doc/python/legend.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.1'
8+
format_version: "1.1"
99
jupytext_version: 1.1.6
1010
kernelspec:
1111
display_name: Python 3
@@ -29,10 +29,12 @@ jupyter:
2929
name: Legends
3030
order: 14
3131
permalink: python/legend/
32+
redirect_from: python/horizontal-legend/
3233
thumbnail: thumbnail/legends.gif
3334
---
3435

3536
#### Show Legend
37+
3638
By default the legend is displayed on Plotly charts with multiple traces.
3739

3840
```python
@@ -217,9 +219,11 @@ fig.update_layout(
217219

218220
fig.show()
219221
```
222+
220223
### Size of Legend Items
221224

222-
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.
225+
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.
226+
223227
```python
224228
import plotly.graph_objects as go
225229

@@ -243,6 +247,7 @@ fig.update_layout(legend= {'itemsizing': 'constant'})
243247

244248
fig.show()
245249
```
250+
246251
#### Grouped Legend
247252

248253
```python
@@ -338,4 +343,5 @@ fig.show()
338343
```
339344

340345
#### Reference
346+
341347
See https://plot.ly/python/reference/#layout-legend for more information!

Diff for: doc/python/peak-finding.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.1'
8+
format_version: "1.1"
99
jupytext_version: 1.1.1
1010
kernelspec:
1111
display_name: Python 3
@@ -23,7 +23,7 @@ jupyter:
2323
version: 3.6.7
2424
plotly:
2525
description: Learn how to find peaks and valleys on datasets in Python
26-
display_as: peak-analysis
26+
display_as: advanced_opt
2727
has_thumbnail: false
2828
language: python
2929
layout: base
@@ -35,6 +35,7 @@ jupyter:
3535
---
3636

3737
#### Imports
38+
3839
The tutorial below imports [Pandas](https://plot.ly/pandas/intro-to-pandas-tutorial/), and [SciPy](https://www.scipy.org/).
3940

4041
```python
@@ -43,6 +44,7 @@ from scipy.signal import find_peaks
4344
```
4445

4546
#### Import Data
47+
4648
To start detecting peaks, we will import some data on milk production by month:
4749

4850
```python
@@ -97,6 +99,7 @@ fig.show()
9799
```
98100

99101
#### Only Highest Peaks
102+
100103
We can attempt to set our threshold so that we identify as many of the _highest peaks_ that we can.
101104

102105
```python

Diff for: doc/python/plot-data-from-csv.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.1'
8+
format_version: "1.1"
99
jupytext_version: 1.2.0
1010
kernelspec:
1111
display_name: Python 3
@@ -23,7 +23,7 @@ jupyter:
2323
version: 3.6.8
2424
plotly:
2525
description: How to create charts from csv files with Plotly and Python
26-
display_as: databases
26+
display_as: advanced_opt
2727
has_thumbnail: false
2828
language: python
2929
layout: base
@@ -34,7 +34,6 @@ jupyter:
3434
thumbnail: thumbnail/csv.jpg
3535
---
3636

37-
3837
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.
3938

4039
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
5756
fig.show()
5857
```
5958

60-
6159
### Plot from CSV with `graph_objects`
6260

6361
```python
@@ -76,6 +74,6 @@ fig.update_layout(title='Apple Share Prices over time (2014)',
7674
fig.show()
7775
```
7876

79-
8077
#### Reference
78+
8179
See https://plot.ly/python/getting-started for more information about Plotly's Python API!

Diff for: doc/python/random-walk.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.1'
8+
format_version: "1.1"
99
jupytext_version: 1.1.1
1010
kernelspec:
1111
display_name: Python 3
@@ -23,7 +23,7 @@ jupyter:
2323
version: 3.6.7
2424
plotly:
2525
description: Learn how to use Python to make a Random Walk
26-
display_as: statistics
26+
display_as: advanced_opt
2727
has_thumbnail: false
2828
language: python
2929
layout: base
@@ -36,10 +36,8 @@ jupyter:
3636

3737
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.
3838

39-
4039
#### Random Walk in 1D
4140

42-
4341
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.
4442

4543
```python
@@ -137,6 +135,7 @@ fig.show()
137135
```
138136

139137
#### Advanced Tip
138+
140139
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
141140

142141
$$
@@ -164,4 +163,3 @@ $$
164163
$$
165164

166165
Therefore, we expect our random walk to hover around $0$ regardless of how many steps we take in our walk.
167-

Diff for: doc/python/smoothing.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.1'
8+
format_version: "1.1"
99
jupytext_version: 1.1.1
1010
kernelspec:
1111
display_name: Python 3
@@ -23,7 +23,7 @@ jupyter:
2323
version: 3.6.7
2424
plotly:
2525
description: Learn how to perform smoothing using various methods in Python.
26-
display_as: signal-analysis
26+
display_as: advanced_opt
2727
has_thumbnail: false
2828
language: python
2929
layout: base
@@ -34,8 +34,8 @@ jupyter:
3434
thumbnail: /images/static-image
3535
---
3636

37-
3837
#### Imports
38+
3939
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/).
4040

4141
```python
@@ -49,6 +49,7 @@ from scipy import signal
4949
```
5050

5151
#### Savitzky-Golay Filter
52+
5253
`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.
5354

5455
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

Comments
 (0)