Skip to content

Commit ac46cbc

Browse files
authored
cross-linking between tutorials (#195)
* cross-linking between tutorials * more cross-linking * more links
1 parent 5f6327b commit ac46cbc

File tree

6 files changed

+56
-8
lines changed

6 files changed

+56
-8
lines changed

python/axes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jupyter:
3434
thumbnail: thumbnail/axes.png
3535
---
3636

37+
**See also** the tutorials on [subplots](/python/subplots) and [multiple axes](/python/multiple-axes/).
38+
3739
#### Toggling Axes Lines, Ticks, Labels, and Autorange
3840
##### Toggling Axis grid lines
3941
Axis grid lines can be disabled by setting the `showgrid` property to `False` for the x and/or y axis.

python/creating-and-updating-figures.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,10 @@ fig.show()
489489

490490
There are also `for_each_xaxis` and `for_each_yaxis` methods that are analogous to the `for_each_trace` method described above. For non-cartesian subplot types (e.g. polar), there are additional `update_{type}` and `for_each_{type}` methods (e.g. `update_polar`, `for_each_polar`).
491491

492+
### Other update methods
493+
494+
`go` figures also support `update_layout_images` in order to [update background layout images](/python/images/), `update_annotations` in order to [update annotations](/python/text-and-annotations/#multiple-annotations), and `update-shapes` in order to [update shapes](/python/shapes/).
495+
492496

493497
#### Chaining figure operations
494498
All of the figure update operations described above are methods that return a reference to the figure being modified. This makes it possible the chain multiple figure modification operations together into a single expression.

python/histograms.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ 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 make Histograms in Python with Plotly.
2626
display_as: statistical
@@ -34,9 +34,13 @@ jupyter:
3434
thumbnail: thumbnail/histogram.jpg
3535
---
3636

37+
In statistics, a [histogram](https://en.wikipedia.org/wiki/Histogram) is representation of the distribution of numerical data, where the data are binned and the count for each bin is represented. More generally, in plotly a histogram is an aggregated bar chart, with several possible aggregation functions (e.g. sum, average, count...). Also, the data to be binned can be numerical data but also categorical or date data.
38+
39+
If you're looking instead for bar charts, i.e. representing data with rectangular
40+
bar, go to the [Bar Chart tutorial](/python/bar-charts/).
41+
3742
## Histogram with Plotly Express
3843

39-
In statistics, a [histogram](https://en.wikipedia.org/wiki/Histogram) is representation of the distribution of numerical data, where the data are binned and the count for each bin is represented. More generally, in plotly a histogram is an aggregated bar chart, with several possible aggregation functions (e.g. sum, average, count...). Also, the data to be binned can be numerical data but also categorical or date data.
4044

4145
[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/).
4246

@@ -331,6 +335,21 @@ fig.append_trace(trace5, 3, 2)
331335
fig.show()
332336
```
333337

338+
### See also: Bar Charts
339+
340+
If you want to display information about the individual items within each histogram bar, then create a stacked bar chart with hover information as shown below. Note that this is not technically the histogram chart type, but it will have a similar effect as shown below by comparing the output of `px.histogram` and `px.bar`. For more information, see the [tutorial on bar charts](/python/bar-charts/).
341+
342+
```python
343+
import plotly.express as px
344+
tips = px.data.tips()
345+
fig1 = px.bar(tips, x='day', y='tip', height=300,
346+
title='Stacked Bar Chart - Hover on individual items')
347+
fig2 = px.histogram(tips, x='day', y='tip', histfunc='sum', height=300,
348+
title='Histogram Chart')
349+
fig1.show()
350+
fig2.show()
351+
```
352+
334353
### Dash Example
335354

336355

python/parallel-categories-diagram.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.1'
9-
jupytext_version: 1.2.1
9+
jupytext_version: 1.1.1
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.6.8
23+
version: 3.7.3
2424
plotly:
2525
description: How to make parallel categories diagrams in Python with Plotly.
2626
display_as: statistical
@@ -38,6 +38,8 @@ The parallel categories diagram is a visualization of multi-dimensional categori
3838

3939
Combinations of category rectangles across dimensions are connected by ribbons, where the height of the ribbon corresponds to the relative frequency of occurrence of the combination of categories in the data set.
4040

41+
For other representations of multivariate data, also see [parallel coordinates](/python/parallel-coordinates-plot/), [radar charts](/python/radar-chart/) and [scatterplot matrix (SPLOM)](/python/splom/).
42+
4143

4244
#### Basic Parallel Category Diagram with plotly.express
4345

python/parallel-coordinates-plot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jupyter:
2222
name: python
2323
nbconvert_exporter: python
2424
pygments_lexer: ipython3
25-
version: 3.6.7
25+
version: 3.7.3
2626
plotly:
2727
description: How to make parallel coorindates plots in Python with Plotly.
2828
display_as: scientific
@@ -37,7 +37,7 @@ jupyter:
3737

3838
## Parallel Coordinates plot with Plotly Express
3939

40-
[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/). In a parallel coordinates plot with `px.parallel_coordinates`, each row of the DataFrame is represented by a polyline mark which traverses a set of parallel axes, one for each of the dimensions. For other representations of multivariate data, also see [radar charts](/python/radar-chart/) and [scatterplot matrix (SPLOM)](/python/splom/).
40+
[Plotly Express](/python/plotly-express/) is the easy-to-use, high-level interface to Plotly, which [operates on "tidy" data](/python/px-arguments/). In a parallel coordinates plot with `px.parallel_coordinates`, each row of the DataFrame is represented by a polyline mark which traverses a set of parallel axes, one for each of the dimensions. For other representations of multivariate data, also see [parallel categories](/python/parallel-categories-diagram/), [radar charts](/python/radar-chart/) and [scatterplot matrix (SPLOM)](/python/splom/).
4141

4242
```python
4343
import plotly.express as px

python/pie-charts.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ 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 make Pie Charts.
2626
display_as: basic
@@ -35,7 +35,10 @@ jupyter:
3535

3636
### Basic Pie Chart ###
3737

38-
A pie chart ``go.Pie`` object is a circular statistical chart, which is divided into sectors to illustrate numerical proportion. Data visualized by the sectors of the pie is set in `values`. The sector labels are set in `labels`. The sector colors are set in `marker.colors`.
38+
A pie chart ``go.Pie`` object is a circular statistical chart, which is divided into sectors to illustrate numerical proportion. Data visualized by the sectors of the pie is set in `values`. The sector labels are set in `labels`. The sector colors are set in `marker.colors`.
39+
40+
If you're looking instead for a multilevel hierarchical pie-like chart, go to the
41+
[Sunburst tutorial](/python/sunburst-charts/).
3942

4043
```python
4144
import plotly.graph_objects as go
@@ -164,6 +167,24 @@ fig.update_layout(title_text='World GDP')
164167
fig.show()
165168
```
166169

170+
### See Also: Sunburst charts
171+
172+
For multilevel pie charts representing hierarchical data, you can use the `Sunburst` chart. A simple example is given below, for more information see the [tutorial on Sunburst charts](/python/sunburst-charts/).
173+
174+
```python
175+
import plotly.graph_objects as go
176+
177+
fig =go.Figure(go.Sunburst(
178+
labels=["Eve", "Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
179+
parents=["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve" ],
180+
values=[10, 14, 12, 10, 2, 6, 6, 4, 4],
181+
))
182+
fig.update_layout(margin = dict(t=0, l=0, r=0, b=0))
183+
184+
fig.show()
185+
186+
```
187+
167188
### Dash Example
168189

169190

0 commit comments

Comments
 (0)