Skip to content

Commit 77b07c5

Browse files
latex docs (#3157)
* latex docs * pin down some deps * pin down some deps * pin down some deps * revert dep changes * pin down some deps * pin down some deps * imshow * jiggling dependencies
1 parent c596d2e commit 77b07c5

File tree

7 files changed

+78
-17
lines changed

7 files changed

+78
-17
lines changed

doc/python/LaTeX.md

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
jupyter:
3+
jupytext:
4+
notebook_metadata_filter: all
5+
text_representation:
6+
extension: .md
7+
format_name: markdown
8+
format_version: '1.2'
9+
jupytext_version: 1.4.2
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.7.7
24+
plotly:
25+
description: How to add LaTeX to python graphs.
26+
display_as: advanced_opt
27+
language: python
28+
layout: base
29+
name: LaTeX
30+
order: 5
31+
page_type: example_index
32+
permalink: python/LaTeX/
33+
thumbnail: thumbnail/latex.jpg
34+
---
35+
36+
#### LaTeX Typesetting
37+
38+
```python
39+
import plotly.express as px
40+
41+
fig = px.line(x=[1, 2, 3, 4], y=[1, 4, 9, 16], title=r'$\alpha_{1c} = 352 \pm 11 \text{ km s}^{-1}$')
42+
fig.update_layout(
43+
xaxis_title=r'$\sqrt{(n_\text{c}(t|{T_\text{early}}))}$',
44+
yaxis_title=r'$d, r \text{ (solar radius)}$'
45+
)
46+
fig.show()
47+
```
48+
49+
```python
50+
import plotly.graph_objs as go
51+
52+
fig = go.Figure()
53+
fig.add_trace(go.Scatter(
54+
x=[1, 2, 3, 4],
55+
y=[1, 4, 9, 16],
56+
name=r'$\alpha_{1c} = 352 \pm 11 \text{ km s}^{-1}$'
57+
))
58+
fig.add_trace(go.Scatter(
59+
x=[1, 2, 3, 4],
60+
y=[0.5, 2, 4.5, 8],
61+
name=r'$\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$'
62+
))
63+
fig.update_layout(
64+
xaxis_title=r'$\sqrt{(n_\text{c}(t|{T_\text{early}}))}$',
65+
yaxis_title=r'$d, r \text{ (solar radius)}$'
66+
)
67+
fig.show()
68+
```

doc/python/imshow.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,7 @@ See the [tutorial on facet plots](/python/facet-plots/) for more information on
412412
```python
413413
import plotly.express as px
414414
from skimage import io
415-
from skimage.data import image_fetcher
416-
path = image_fetcher.fetch('data/cells.tif')
417-
data = io.imread(path)
415+
data = io.imread("https://github.com/scikit-image/skimage-tutorials/raw/main/images/cells.tif")
418416
img = data[20:45:2]
419417
fig = px.imshow(img, facet_col=0, binary_string=True, facet_col_wrap=5)
420418
fig.show()
@@ -446,9 +444,7 @@ For three-dimensional image datasets, obtained for example by MRI or CT in medic
446444
```python
447445
import plotly.express as px
448446
from skimage import io
449-
from skimage.data import image_fetcher
450-
path = image_fetcher.fetch('data/cells.tif')
451-
data = io.imread(path)
447+
data = io.imread("https://github.com/scikit-image/skimage-tutorials/raw/main/images/cells.tif")
452448
img = data[25:40]
453449
fig = px.imshow(img, animation_frame=0, binary_string=True, labels=dict(animation_frame="slice"))
454450
fig.show()
@@ -476,9 +472,7 @@ It is possible to view 4-dimensional datasets (for example, 3-D images evolving
476472
```python
477473
import plotly.express as px
478474
from skimage import io
479-
from skimage.data import image_fetcher
480-
path = image_fetcher.fetch('data/cells.tif')
481-
data = io.imread(path)
475+
data = io.imread("https://github.com/scikit-image/skimage-tutorials/raw/main/images/cells.tif")
482476
data = data.reshape((15, 4, 256, 256))[5:]
483477
fig = px.imshow(data, animation_frame=0, facet_col=1, binary_string=True)
484478
fig.show()

doc/python/ml-tsne-umap-projections.md

+2-2
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.1'
9-
jupytext_version: 1.1.1
8+
format_version: '1.2'
9+
jupytext_version: 1.4.2
1010
kernelspec:
1111
display_name: Python 3
1212
language: python

doc/requirements.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pandas==1.0.3
66
statsmodels==0.11.1
77
scipy==1.3.1
88
patsy==0.5.1
9-
numpy==1.16.0
9+
numpy==1.19.5
1010
plotly-geo
1111
python-igraph
1212
geopandas==0.8.1
@@ -16,7 +16,7 @@ psutil
1616
requests
1717
networkx
1818
squarify
19-
scikit-image
19+
scikit-image==0.18.1
2020
scikit-learn
2121
sphinx
2222
sphinx_bootstrap_theme
@@ -27,7 +27,7 @@ datashader
2727
pyarrow
2828
cufflinks==0.17.3
2929
kaleido
30-
umap-learn
30+
umap-learn==0.5.1
3131
pooch
3232
wget
3333
nbconvert==5.6.1

packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_graph_objs.py

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"AngularAxis",
88
"Annotation",
99
"Annotations",
10-
"Area",
1110
"Bar",
1211
"Box",
1312
"ColorBar",

packages/python/plotly/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def get_latest_publish_build_info(repo, branch):
245245
builds = [
246246
j
247247
for j in branch_jobs
248-
if j.get("workflows", {}).get("job_name", None) == "publish"
248+
if j.get("workflows", {}).get("job_name", None) == "publish-dist"
249249
and j.get("status", None) == "success"
250250
]
251251
build = builds[0]

packages/python/plotly/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ deps=
5858
retrying==1.3.3
5959
pytest==3.5.1
6060
pandas==0.24.2
61+
numpy==1.19.5
6162
xarray==0.10.9
6263
statsmodels==0.10.2
6364
pillow==5.2.0
6465
backports.tempfile==1.0
6566
optional: --editable=file:///{toxinidir}/../plotly-geo
66-
optional: numpy==1.16.5
6767
optional: ipython[all]==5.1.0
6868
optional: ipywidgets==7.2.0
6969
optional: ipykernel==4.8.2

0 commit comments

Comments
 (0)