Skip to content

Commit c716be7

Browse files
updates for 5.4.0
1 parent df19fc7 commit c716be7

File tree

2 files changed

+103
-6
lines changed

2 files changed

+103
-6
lines changed

Diff for: doc/python/figure-structure.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.2'
9-
jupytext_version: 1.6.0
8+
format_version: '1.3'
9+
jupytext_version: 1.11.4
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.7.6
23+
version: 3.8.11
2424
plotly:
2525
description: The structure of a figure - data, traces and layout explained.
2626
display_as: file_settings
@@ -93,7 +93,7 @@ The second of the three top-level attributes of a figure is `layout`, whose valu
9393
* Subplots of various types on which can be drawn multiple traces and which are positioned in paper coordinates:
9494
* `xaxis`, `yaxis`, `xaxis2`, `yaxis3` etc: X and Y cartesian axes, the intersections of which are cartesian subplots
9595
* `scene`, `scene2`, `scene3` etc: 3d scene subplots
96-
* `ternary`, `ternary2`, `ternary3`, `polar`, `polar2`, `polar3`, `geo`, `geo2`, `geo3`, `mapbox`, `mapbox2`, `mabox3` etc: ternary, polar, geo or mapbox subplots
96+
* `ternary`, `ternary2`, `ternary3`, `polar`, `polar2`, `polar3`, `geo`, `geo2`, `geo3`, `mapbox`, `mapbox2`, `mabox3`, `smith`, `smith2` etc: ternary, polar, geo, mapbox or smith subplots
9797
* Non-data marks which can be positioned in paper coordinates, or in data coordinates linked to 2d cartesian subplots:
9898
* `annotations`: [textual annotations with or without arrows](/python/text-and-annotations/)
9999
* `shapes`: [lines, rectangles, ellipses or open or closed paths](/python/shapes/)
@@ -151,9 +151,9 @@ The following trace types are compatible with 2d-cartesian subplots via the `xax
151151
* [`carpet`](/python/carpet-plot/): a special trace type for building [carpet plots](/python/carpet-plot/), in that other traces can use as subplots (see below)
152152
* [`splom`](/python/splom/): multi-dimensional scatter plots which implicitly refer to many 2-d cartesian subplots at once.
153153

154-
### 3D, Polar and Ternary Trace Types and Subplots
154+
### 3D, Polar, Ternary and Smith Trace Types and Subplots
155155

156-
Beyond 2D cartesian subplots, figures can include [three-dimensional cartesian subplots](/python/3d-charts/), [polar subplots](/python/polar-chart/) and [ternary subplots](/python/ternary-plots/). The following trace types support attributes named `scene`, `polar` or `ternary`, whose values must refer to corresponding objects in the layout portion of the figure i.e. `ternary="ternary2"` etc. Note that attributes such as `layout.scene` and `layout.ternary2` etc do not have to be explicitly defined, in which case default values will be inferred. Multiple traces of a compatible type can be placed on the same subplot.
156+
Beyond 2D cartesian subplots, figures can include [three-dimensional cartesian subplots](/python/3d-charts/), [polar subplots](/python/polar-chart/), [ternary subplots](/python/ternary-plots/) and [smith subplots](/python/smith-charts/). The following trace types support attributes named `scene`, `polar`, `smith` or `ternary`, whose values must refer to corresponding objects in the layout portion of the figure i.e. `ternary="ternary2"` etc. Note that attributes such as `layout.scene` and `layout.ternary2` etc do not have to be explicitly defined, in which case default values will be inferred. Multiple traces of a compatible type can be placed on the same subplot.
157157

158158
The following trace types are compatible with 3D subplots via the `scene` attribute, which contains special [camera controls](/python/3d-camera-controls/):
159159

@@ -171,6 +171,10 @@ The following trace types are compatible with ternary subplots via the `ternary`
171171

172172
* [`scatterternary`](/python/ternary-plots/), which can be used to draw individual markers, [curves and filled areas](/python/ternary-contour/)
173173

174+
The following trace types are compatible with smith subplots via the `smith` attribute:
175+
176+
* [`scattersmith`](/python/smith-charts/), which can be used to draw individual markers, curves and filled areas
177+
174178
### Map Trace Types and Subplots
175179

176180
Figures can include two different types of map subplots: [geo subplots for outline maps](/python/map-configuration/) and [mapbox subplots for tile maps](/python/mapbox-layers/). The following trace types support attributes named `geo` or `mapbox`, whose values must refer to corresponding objects in the layout i.e. `geo="geo2"` etc. Note that attributes such as `layout.geo2` and `layout.mapbox` etc do not have to be explicitly defined, in which case default values will be inferred. Multiple traces of a compatible type can be placed on the same subplot.

Diff for: doc/python/smith-charts.md

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
jupyter:
3+
jupytext:
4+
notebook_metadata_filter: all
5+
text_representation:
6+
extension: .md
7+
format_name: markdown
8+
format_version: '1.3'
9+
jupytext_version: 1.11.4
10+
kernelspec:
11+
display_name: Python 3
12+
language: python
13+
name: python3
14+
language_info:
15+
codemirror_mode:
16+
name: ipython
17+
version: 3
18+
file_extension: .py
19+
mimetype: text/x-python
20+
name: python
21+
nbconvert_exporter: python
22+
pygments_lexer: ipython3
23+
version: 3.8.11
24+
plotly:
25+
description: How to make Smith Charts with plotly.
26+
display_as: scientific
27+
language: python
28+
layout: base
29+
name: Smith Charts
30+
order: 21
31+
page_type: u-guide
32+
permalink: python/smith-charts/
33+
thumbnail: thumbnail/contourcarpet.jpg
34+
---
35+
36+
A [Smith Chart](https://en.wikipedia.org/wiki/Smith_chart) is a specialized chart for visualizing [complex numbers](https://en.wikipedia.org/wiki/Complex_number): numbers with both a real and imaginary part.
37+
38+
39+
### Smith Charts with Plotly Graph Objects
40+
41+
```python
42+
import plotly.graph_objects as go
43+
go.Figure(
44+
go.Scattersmith(
45+
imag=[0.5, 1, 2, 3],
46+
real=[0.5, 1, 2, 3],
47+
)
48+
)
49+
```
50+
51+
### Smith Chart Subplots and Styling
52+
53+
```python
54+
import plotly.graph_objects as go
55+
go.Figure(
56+
data=[
57+
go.Scattersmith(
58+
imag=[1],
59+
real=[1],
60+
marker_symbol='x',
61+
marker_size=30,
62+
marker_color="green",
63+
subplot="smith1"
64+
),
65+
go.Scattersmith(
66+
imag=[1],
67+
real=[1],
68+
marker_symbol='x',
69+
marker_size=30,
70+
marker_color="pink",
71+
subplot="smith2"
72+
)
73+
],
74+
layout=dict(
75+
smith=go.layout.Smith(
76+
bgcolor='lightgrey',
77+
realaxis_gridcolor='red',
78+
imaginaryaxis_gridcolor='blue',
79+
domain=dict(x=[0,0.5])
80+
),
81+
smith2=go.layout.Smith(
82+
bgcolor='lightgrey',
83+
realaxis_gridcolor='blue',
84+
imaginaryaxis_gridcolor='red',
85+
domain=dict(x=[0.5,1])
86+
)
87+
)
88+
)
89+
```
90+
91+
#### Reference
92+
See https://plotly.com/python/reference/scattersmith/ for more information and chart attribute options!
93+

0 commit comments

Comments
 (0)