Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Documentation conversion into Mkdocs#5384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
daexs wants to merge191 commits intoplotly:live-docs
base:live-docs
Choose a base branch
Loading
fromdaexs:mkdocs-conversion
Open
Show file tree
Hide file tree
Changes from23 commits
Commits
Show all changes
191 commits
Select commitHold shift + click to select a range
a2787a0
- Move contents of `commands.py` to scripts in new `bin` directory an…
gvwilsonJul 10, 2025
3dced44
preload _plotly_utils
LiamConnorsJul 22, 2025
bc32c86
add docstrings directly to px functions
LiamConnorsDec 2, 2024
174b0e9
change docstring style
LiamConnorsJul 22, 2025
badb199
Merge pull request #5292 from plotly/plotly.express-docstrings
gvwilsonJul 22, 2025
86f69f1
Merge branch 'mkdocs-conversion' into preload-plotly-utils
gvwilsonJul 22, 2025
c0237f6
Merge pull request #5290 from plotly/preload-plotly-utils
gvwilsonJul 22, 2025
76b36dd
feat: numpy documentation style
gvwilsonJul 22, 2025
96af9f6
feat: regenerating Python code with .js fixes
gvwilsonJul 22, 2025
9525f6a
feat: converting doc/python/*.md using bin/run_markdown.py
gvwilsonJul 23, 2025
80792d8
better verbosity
gvwilsonJul 26, 2025
9386750
feat: conditionalize Makefile target for testing
gvwilsonJul 29, 2025
6d1e5c8
Merge remote-tracking branch 'origin/fix-docs' into mkdocs-conversion
gvwilsonJul 30, 2025
20c60ef
Merge remote-tracking branch 'origin/add-missing-imports' into mkdocs…
gvwilsonJul 30, 2025
a07ea45
feat: script to check all examples in doc/python.
gvwilsonJul 30, 2025
5cad013
use _parse_md function
LiamConnorsJul 30, 2025
2e38a9a
don't process code block in region sections
LiamConnorsJul 30, 2025
e45f54c
Merge pull request #5307 from plotly/update-script
gvwilsonJul 31, 2025
73a8291
modify tests to import from graph_objects
gvwilsonJul 30, 2025
36ee5e9
add trivial test to make sure plotly.graph_objects import works
gvwilsonAug 1, 2025
57d923c
updating notes
gvwilsonAug 1, 2025
ca37382
swapping graph_objs and graph_objects
gvwilsonAug 5, 2025
31b73ce
Added backslashes to descriptions with '[][]'
daexsAug 12, 2025
fae9563
Fixed markdown formatting for valType 'info_array'
daexsAug 14, 2025
c2e20c7
Added backslashes to descriptions with '[][]'
daexsAug 12, 2025
0f9b311
Fixed markdown formatting for valType 'info_array'
daexsAug 14, 2025
3f5ee9f
regenerating with latest changes
gvwilsonAug 14, 2025
f345aef
Fixed double bracket error for regular expressions
daexsAug 14, 2025
f840f11
Minor code cleanup
daexsAug 14, 2025
4a7873c
Fixed double bracket error in 'basedatatypes.py'
daexsAug 14, 2025
b0cd2f9
Merge branch 'mkdocs-conversion' of https://github.com/plotly/plotly.…
daexsAug 14, 2025
cd623aa
Regenerated code after basevalidators.py changes
daexsAug 14, 2025
98fab98
Fix SyntaxWarning and adjusted valType 'enumerated' docstring format.
daexsAug 14, 2025
9ddde0f
Fixed formatting issues with nested enumerated docstrings in info_arr…
daexsAug 15, 2025
683643c
Fixed list format in 'Dash' and 'String' properties.
daexsAug 18, 2025
efde201
Fixed formatting for 'Compound' and 'color' properties.
daexsAug 18, 2025
01da1c6
Fixed formatting for 'Integer' types.
daexsAug 18, 2025
8d12a05
Fixed formatting for 'Colorscale', 'CompoundArray', and 'BaseData' ty…
daexsAug 19, 2025
6690116
Fixed confusing indentation & some formatting
daexsAug 19, 2025
4154910
Fixed formatting issues and consistency
daexsAug 19, 2025
df9cc3a
feat: allow `--schema path` option to code generation
gvwilsonAug 20, 2025
77d19bb
Merge pull request #17 from gvwilson/mkdocs-conversion
daexsAug 20, 2025
bdd049b
Fixed code block and type annotation formatting.
daexsAug 21, 2025
cbd983d
Minor code cleanup
daexsAug 21, 2025
95ea818
Fixed example parsing error
daexsAug 22, 2025
31c8a2f
Fixed formatting issues and modified json file for double bracket error.
daexsAug 25, 2025
f35c9fa
Fixed **kwargs bold formatting issue
daexsAug 26, 2025
eef950e
Fixed types for parameters 'annotation', 'annotation_position', and '…
daexsAug 26, 2025
e339098
Merge branch 'main' into mkdocs-conversion
gvwilsonAug 27, 2025
3e5ee8b
Merge branch 'main' into mkdocs-conversion
gvwilsonAug 27, 2025
a943429
saving generated example files
gvwilsonAug 27, 2025
569b6d7
feat: build YAML table of contents for examples
gvwilsonAug 27, 2025
6d2f32f
fix: switch to relative paths in examples
gvwilsonAug 27, 2025
dc0418a
feat: fixing some dangling references in doc/python example files
gvwilsonAug 28, 2025
66208c6
Added pages to nav bar and extra css styling
daexsAug 28, 2025
d116e27
Fixed warnings and errors
daexsAug 29, 2025
8607d4a
feat: allow bin/run_markdown.py to take a single block number for tes…
gvwilsonAug 29, 2025
9a40907
Fixed small import and missing module errors
daexsSep 2, 2025
b215b37
Fixed small missing import and variable errors. Also added 'getting-s…
daexsSep 3, 2025
1847061
Added permalinks to replace empty md files
daexsSep 3, 2025
9da9b2d
Fixed Image not JSON serializable error
daexsSep 3, 2025
883c0d9
Edited comment for clarity
daexsSep 3, 2025
63882d0
Fixed deprecation warning for 'type' found when county-choropleth.md …
daexsSep 3, 2025
7e8a638
Fixed 403 Error from Wikimedia when reading image
daexsSep 4, 2025
77e76af
Made variable state shared across codeblocks and cleaned up previous …
daexsSep 4, 2025
1d1620c
Fixed html image rendering and reading image from wikimedia
daexsSep 4, 2025
2310f66
Replaced image rendering from IPython's image display and overrided P…
daexsSep 5, 2025
a673e59
Fixed pip install invalid syntax error
daexsSep 5, 2025
0fa35da
Fixed some references and absolute links that were broken
daexsSep 8, 2025
1d89e17
Removed ' install' and added versions. Also changed the umap module i…
daexsSep 9, 2025
373e1bc
Removed from the navigation bar and reverted previous changes to pac…
daexsSep 10, 2025
6e300ad
Configured mkdocs to be able to resolve absolute links and set them r…
daexsSep 11, 2025
c3a98b6
Edited navigation bar to make section names more user friendly.
daexsSep 17, 2025
64b30da
Reorganized the navigation bar to match the existing Python docs.
daexsSep 17, 2025
8f43c74
add some links, css, and restructure content
LiamConnorsSep 17, 2025
e712a01
Update is-plotly-free.md
LiamConnorsSep 17, 2025
6aeb223
Update mkdocs.yml
LiamConnorsSep 17, 2025
1fadabe
Update mkdocs.yml
LiamConnorsSep 18, 2025
d970523
Update is-plotly-free.md
LiamConnorsSep 18, 2025
3514472
Manually added new script that generates the API Reference markdown p…
daexsSep 19, 2025
8beee0d
Excluded some markdown files from docs nav bar build to prevent log m…
daexsSep 19, 2025
a4dc547
Merge branch 'mkdocs-conversion' into update-names
LiamConnorsSep 22, 2025
6c8ea1b
Merge pull request #48 from daexs/update-names
LiamConnorsSep 22, 2025
d6fc630
Fix lists not rendering properly in some examples
daexsSep 22, 2025
4f0c61a
Fixed minor mistake in the Makefile when running 'examples-force'
daexsSep 22, 2025
566c835
Added syntax highlighting to python code blocks
daexsSep 22, 2025
430e485
add plotly studio and dash club info
LiamConnorsSep 22, 2025
5deca22
Update mkdocs.yml
LiamConnorsSep 22, 2025
b4c5cb4
delete generated images
LiamConnorsSep 23, 2025
0c3d202
add dataset from docs generation
LiamConnorsSep 23, 2025
259a8e1
only generate html
LiamConnorsSep 23, 2025
0fac168
update html generation
LiamConnorsSep 23, 2025
6cf3ff4
move examples
LiamConnorsSep 23, 2025
ee82f48
remove duplicate files
LiamConnorsSep 23, 2025
8de444f
regen files
LiamConnorsSep 23, 2025
b8319de
Reinclude pages not directly accessible from navigation and suppress …
daexsSep 23, 2025
7994893
Merge pull request #68 from daexs/add-banner
LiamConnorsSep 23, 2025
d74a371
Merge pull request #70 from daexs/add-gh-repo
LiamConnorsSep 23, 2025
c6099ed
Merge branch 'mkdocs-conversion' into restructure-2
LiamConnorsSep 23, 2025
0d19bd5
Merge pull request #72 from daexs/restructure-2
LiamConnorsSep 23, 2025
d88da53
add missing reference pages
LiamConnorsSep 23, 2025
c24f7d6
Update mkdocs.yml
LiamConnorsSep 23, 2025
a2d466e
Update mkdocs.yml
LiamConnorsSep 23, 2025
d077940
Fixed internal links for axes.md
daexsSep 23, 2025
ecc2b1f
Fixed some internal links and fixed 'figure-structure.md' content bei…
daexsSep 23, 2025
816001b
Merge pull request #73 from daexs/add-back-missing-ref
LiamConnorsSep 24, 2025
36bd491
Changed 'https://plotly.com/python/' links into internal links and fi…
daexsSep 25, 2025
fb5d918
removing out-of-date notes
gvwilsonSep 25, 2025
4fdae5b
Changed links pointing to 'https://plot.ly' into internal links
daexsSep 25, 2025
402d03f
Merge branch 'mkdocs-conversion' of https://github.com/daexs/plotly.p…
daexsSep 25, 2025
ea587d9
refactor: small cleanups to build process
gvwilsonSep 26, 2025
1d2046a
Remove image base64 conversion code from the examples
daexsSep 26, 2025
28d14dd
feat: remove unused metadata in Markdown files
gvwilsonSep 26, 2025
c1e1a1b
Replaced all links to 'https://plotly.com/python-api-reference/' into…
daexsSep 26, 2025
44e72d0
Update run_markdown.py
LiamConnorsSep 29, 2025
4d2be36
Fixed missing import statements for plotly.express and urllib.request
daexsSep 29, 2025
f6bf056
Fixed links rendering as regular text and lists not rendering correctly.
daexsSep 29, 2025
8db0756
Added custom formatter and styling to hide code blocks with 'hide_cod…
daexsSep 30, 2025
9161db0
Fixed 'docs' rule
daexsSep 30, 2025
a265548
Changed the docstring style of the plotly figure_factory module to numpy
daexsOct 1, 2025
f17cb33
Fixed links to correctly reference their respective files and render …
daexsOct 1, 2025
362eba4
Fixed html rendering in codeblocks
daexsOct 1, 2025
b7b3f28
Reformatted dash code blocks to allow the code snippets and charts to…
daexsOct 1, 2025
01036e1
Remove previously added custom formatter to hide Dash code
daexsOct 1, 2025
3ba7f1e
Added styling to remove maplibre controls container under the interac…
daexsOct 2, 2025
16f34ec
Merge pull request #81 from daexs/fix-mathjax
LiamConnorsOct 3, 2025
a79bdb8
add redirects
LiamConnorsOct 3, 2025
064a52f
Merge pull request #88 from daexs/add-redirects
daexsOct 3, 2025
a5a1c00
Added plotly studio image to the nav bar.
daexsOct 6, 2025
108933b
Cleaned up 'plotly-styles.css' file and removed the arrow indicating …
daexsOct 6, 2025
e2464dd
Fixed dash_bio figures not rendering in 'doc/python/bio-clustergram.md'.
daexsOct 6, 2025
db53d9b
Merge branch 'mkdocs-conversion' of https://github.com/daexs/plotly.p…
daexsOct 6, 2025
8cc3b51
Fixed headings that weren't rendering in Markdown properly.
daexsOct 7, 2025
4bc8eed
Added back orca-management.md into the navigation
daexsOct 8, 2025
29e6b84
Resolved more links and added a new redirect for 'mapbox-layers'
daexsOct 8, 2025
abb898f
Added footer and adjusted height of plotly studio image
daexsOct 9, 2025
38e69f4
Fixed minor link typo in footer
daexsOct 9, 2025
68c6d16
Added header and dash banner image
daexsOct 14, 2025
03120e6
Minor fix to navigation page titles
daexsOct 16, 2025
d8e18b2
Merge pull request #86 from daexs/fix-plotly-module-formatting
daexsOct 16, 2025
66eea0e
Merge pull request #87 from daexs/fix-html-and-dash-render
daexsOct 16, 2025
270fade
Merging mkdocs-conversion into this branch and resolving merge conflicts
daexsOct 16, 2025
001cb53
Merge pull request #80 from daexs/remove-unused-metadata
daexsOct 16, 2025
e22fbb7
Adjusted title of pages in graph_objects module figure overview
daexsOct 16, 2025
0fa6e72
Merge pull request #98 from daexs/adjust-styling-and-format
daexsOct 16, 2025
37aacd4
Fixed minor naming error for header div.
daexsOct 16, 2025
55db0a6
Added index pages to each category in the nav bar.
daexsOct 20, 2025
3204832
Converted redirect links into internal links.
daexsOct 21, 2025
51eb8fc
Resolved links and removed Dash banner from the bottom of the 'Overvi…
daexsOct 21, 2025
faf9bfb
Added dash examples to select index pages and updated dash banner logic
daexsOct 21, 2025
622af18
Added more redirects, changed redirect links in markdown files, resol…
daexsOct 22, 2025
ef612af
Redisplay external link arrows on dash banner and plotly studio ad. S…
daexsOct 22, 2025
e64dc40
Changed the text for all internal links that used to be 'https://plot…
daexsOct 22, 2025
3caa780
Remove page that was accidentally added.
daexsOct 22, 2025
2eb1590
Changed name of 'migrate-to-maplibre.md' to remain consistent with li…
daexsOct 23, 2025
79f7440
Updated page name reference for mapbox to maplibre migration.
daexsOct 23, 2025
654fde1
Resolved more links, added a redirect, and fixed list render
daexsOct 23, 2025
9ff8730
Fix list rendering
daexsOct 23, 2025
eb6ed26
Added styling for footer text when page is in dark mode.
daexsOct 23, 2025
ae2f80b
Added extensions to allow proper LaTeX rendering
daexsOct 23, 2025
ae54f18
Converted callouts into admonitions
daexsOct 24, 2025
a7a5122
Fixed graph rendering in creating-and-updating-figures.md
daexsOct 27, 2025
e1ac526
Added more admonitions
daexsOct 27, 2025
3f03d07
Remove empty python blocks
daexsOct 27, 2025
9fe8873
Added more admonitions, including those for warning messages
daexsOct 27, 2025
9643249
Updated plotly ad on nav bar
daexsOct 27, 2025
2c8f030
Added css styling to keep tables within the width of the page's body/
daexsOct 27, 2025
fea9b38
Added an 'edit this page' button
daexsOct 27, 2025
edf2b1a
Fixed styling of icon in edit button
daexsOct 27, 2025
3ae43db
Merge branch 'mkdocs-conversion' into update-link-text
daexsOct 28, 2025
89b3dd4
Merge pull request #102 from daexs/update-link-text
daexsOct 28, 2025
87da393
Merge remote-tracking branch 'upstream/live-docs' into mkdocs-conversion
daexsOct 28, 2025
c28d17a
Update meta descriptions for files in pages/, rename markdown files i…
daexsOct 30, 2025
305e674
Minor formatting change and added missing function into 'plotly/expre…
daexsOct 31, 2025
fe05438
Fixed graph rendering
daexsOct 31, 2025
f5a4c3e
Patched img.show to embed the images generated properly.
daexsNov 1, 2025
f53b41e
Add docs dependencies into pyproject.toml
daexsNov 6, 2025
15a23af
Minor changes to get docs running properly
daexsNov 10, 2025
2381234
Moved most files associated with the docs into 'docs/'
daexsNov 13, 2025
6a55b42
Fixed broken references to markdown files, modified main.html to not …
daexsNov 13, 2025
3c2db92
Update pyproject.toml and fix Makefile to work within docs/
daexsNov 13, 2025
9fce7ca
Update pyproject.toml
daexsNov 13, 2025
9983390
Fixed code formatting
daexsNov 13, 2025
5a975f4
More code formatting fixes
daexsNov 13, 2025
7ddcd6e
Add missing commands.py for testing purposes
daexsNov 13, 2025
107e992
More code formatting fixes
daexsNov 13, 2025
409127b
Remove commands.py for cleanliness
daexsNov 13, 2025
dcbaea4
Reverted changes to codegen because it created bugs
daexsNov 13, 2025
d18bf9e
Updated uv lock
daexsNov 14, 2025
a07b53e
Modified test to match expected output from previous changes in _plot…
daexsNov 17, 2025
0fb9832
Fixed css styling in footer
daexsNov 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 35 additions & 10 deletions_plotly_utils/colors/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -425,11 +425,18 @@ def convert_colors_to_same_type(
be coverted to the selected colortype. If colors is None, then there is an
option to return portion of the DEFAULT_PLOTLY_COLORS

:param (str|tuple|list) colors: either a plotly scale name, an rgb or hex
Parameters
----------
colors : str or tuple or list
Either a plotly scale name, an rgb or hex
color, a color tuple or a list/tuple of colors
:param (list) scale: see docs for validate_scale_values()
scale : list
See docs for validate_scale_values()

:rtype (tuple) (colors_list, scale) if scale is None in the function call,
Returns
-------
A tuple of (colors_list, scale)
If scale is None in the function call,
then scale will remain None in the returned tuple
"""
colors_list = []
Expand DownExpand Up@@ -495,7 +502,10 @@ def convert_dict_colors_to_same_type(colors_dict, colortype="rgb"):
"""
Converts a colors in a dictionary of colors to the specified color type

:param (dict) colors_dict: a dictionary whose values are single colors
Parameters
----------
colors_dict : dict
A dictionary whose values are single colors
"""
for key in colors_dict:
if "#" in colors_dict[key]:
Expand DownExpand Up@@ -523,7 +533,10 @@ def validate_scale_values(scale):
"""
Validates scale values from a colorscale

:param (list) scale: a strictly increasing list of floats that begins
Parameters
----------
scale : list
A strictly increasing list of floats that begins
with 0 and ends with 1. Its usage derives from a colorscale which is
a list of two-lists (a list with two elements) of the form
[value, color] which are used to determine how interpolation weighting
Expand DownExpand Up@@ -570,9 +583,12 @@ def make_colorscale(colors, scale=None):
interpolated colorscale will be generated. If 'scale' is a specificed
list, it must be the same legnth as colors and must contain all floats
For documentation regarding to the form of the output, see
https://plot.ly/python/reference/#mesh3d-colorscale
[https://plotly.com/python/reference/#mesh3d-colorscale](/reference/graph_objects/Mesh3d.md#plotly.graph_objects.Mesh3d.colorscale)

:param (list) colors: a list of single colors
Parameters
----------
colors : list
A list of single colors
"""
colorscale = []

Expand DownExpand Up@@ -652,7 +668,10 @@ def convert_to_RGB_255(colors):
to just x. This is the way rounding works in Python 3 and in current
statistical analysis to avoid rounding bias

:param (list) rgb_components: grabs the three R, G and B values to be
Parameters
----------
rgb_components : list
Grabs the three R, G and B values to be
returned as computed in the function
"""
rgb_components = []
Expand DownExpand Up@@ -752,9 +771,15 @@ def hex_to_rgb(value):
"""
Calculates rgb values from a hex color code.

:param (string) value: Hex color string
Parameters
----------
value : str
Hex color string

:rtype (tuple) (r_value, g_value, b_value): tuple of rgb values
Returns
-------
A tuple of (r_value, g_value, b_value)
Tuple of rgb values
"""
value = value.lstrip("#")
hex_total_length = len(value)
Expand Down
14 changes: 10 additions & 4 deletionsbin/run_markdown.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@
import io
from pathlib import Path
import plotly.graph_objects as go
import re
import sys
import traceback

Expand DownExpand Up@@ -66,14 +67,17 @@ def _do_file(args, input_file, block_number=None):
print(f"Error writing output file: {e}", file=sys.stderr)
sys.exit(1)

def _contains_latex(code):
"""Check if code likely contains LaTeX expressions."""
return "cdn" if '$' in code and re.search(r'\$[^$]+\$', code) else False

def _capture_plotly_show(fig, counter, result, output_dir, stem):
def _capture_plotly_show(fig, counter, result, output_dir, stem, mathjax_option):
"""Saves HTML figures."""
# Save HTML and get the content for embedding
html_filename = f"{stem}_{counter}.html"
html_path = output_dir / html_filename
fig.write_html(html_path, include_plotlyjs="cdn")
html_content = fig.to_html(include_plotlyjs="cdn", div_id=f"plotly-div-{counter}", full_html=False)
fig.write_html(html_path, include_plotlyjs="cdn", include_mathjax=mathjax_option)
html_content = fig.to_html(include_plotlyjs="cdn",include_mathjax=mathjax_option,div_id=f"plotly-div-{counter}", full_html=False)
result["html_files"].append(html_filename)
result.setdefault("html_content", []).append(html_content)

Expand DownExpand Up@@ -216,6 +220,8 @@ def _run_all_blocks(args, input_file, code_blocks, stem=None, block_number=None)

def _run_code(code, output_dir, figure_counter, stem, exec_globals):
"""Execute code capturing output and generated files."""
mathjax_option = _contains_latex(code)

# Capture stdout and stderr
stdout_buffer = io.StringIO()
stderr_buffer = io.StringIO()
Expand All@@ -241,7 +247,7 @@ def patched_show(self, *args, **kwargs):
nonlocal figure_counter
figure_counter += 1
if stem is not None:
_capture_plotly_show(self, figure_counter, result, output_dir, stem)
_capture_plotly_show(self, figure_counter, result, output_dir, stem, mathjax_option)
original_show = go.Figure.show
go.Figure.show = patched_show
exec(code, exec_globals)
Expand Down
2 changes: 1 addition & 1 deletiondoc/python/3d-line-plots.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -86,4 +86,4 @@ fig.show()

#### Reference

See [function reference for `px.(line_3d)`](https://plotly.com/python-api-reference/generated/plotly.express.line_3d) or [https://plotly.com/python/reference/scatter3d/#scatter3d-marker-line](reference/graph_objects/scatter3d-package/Marker.md#plotly.graph_objects.scatter3d.Marker.line) for more information and chart attribute options!
See [function reference for `px.(line_3d)`](reference/plotly-express.md#plotly.express.line_3d) or [https://plotly.com/python/reference/scatter3d/#scatter3d-marker-line](reference/graph_objects/scatter3d-package/Marker.md#plotly.graph_objects.scatter3d.Marker.line) for more information and chart attribute options!
6 changes: 5 additions & 1 deletiondoc/python/3d-mesh.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,11 +43,15 @@ fig.show()
Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with <a class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**


```python hide_code=true
<pre hide_code="true">
```python
from IPython.display import IFrame
snippet_url = 'https://python-docs-dash-snippets.herokuapp.com/python-docs-dash-snippets/'
IFrame(snippet_url + '3d-mesh', width='100%', height=1200)
```
</pre>

<iframe src="https://python-docs-dash-snippets.herokuapp.com/python-docs-dash-snippets/3d-mesh" width="100%" height="1200" style="border:none;"></iframe>

<div style="font-size: 0.9em;"><div style="width: calc(100% - 30px); box-shadow: none; border: thin solid rgb(229, 229, 229);"><div style="padding: 5px;"><div><p><strong>Sign up for Dash Club</strong> → Free cheat sheets plus updates from Chris Parmer and Adam Schroeder delivered to your inbox every two months. Includes tips and tricks, community apps, and deep dives into the Dash architecture.
<u><a href="https://go.plotly.com/dash-club?utm_source=Dash+Club+2022&utm_medium=graphing_libraries&utm_content=inline">Join now</a></u>.</p></div></div></div></div>
Expand Down
8 changes: 6 additions & 2 deletionsdoc/python/3d-scatter-plots.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -48,11 +48,15 @@ fig.show()
Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with <a class="plotly-red" href="https://plotly.com/dash/">Dash Enterprise</a>.**


```python hide_code=true
<pre hide_code="true">
```python
from IPython.display import IFrame
snippet_url = 'https://python-docs-dash-snippets.herokuapp.com/python-docs-dash-snippets/'
IFrame(snippet_url + '3d-scatter-plots', width='100%', height=1200)
```
</pre>

<iframe src="https://python-docs-dash-snippets.herokuapp.com/python-docs-dash-snippets/3d-scatter-plots" width="100%" height="1200" style="border:none;"></iframe>

<div style="font-size: 0.9em;"><div style="width: calc(100% - 30px); box-shadow: none; border: thin solid rgb(229, 229, 229);"><div style="padding: 5px;"><div><p><strong>Sign up for Dash Club</strong> → Free cheat sheets plus updates from Chris Parmer and Adam Schroeder delivered to your inbox every two months. Includes tips and tricks, community apps, and deep dives into the Dash architecture.
<u><a href="https://go.plotly.com/dash-club?utm_source=Dash+Club+2022&utm_medium=graphing_libraries&utm_content=inline">Join now</a></u>.</p></div></div></div></div>
Expand DownExpand Up@@ -108,4 +112,4 @@ fig.show()

#### Reference

See [function reference for `px.scatter_3d()`](https://plotly.com/python-api-reference/generated/plotly.express.scatter_3d) or [https://plotly.com/python/reference/scatter3d/](reference/graph_objects/Scatter3d.md) for more information and chart attribute options!
See [function reference for `px.scatter_3d()`](reference/plotly-express.md#plotly.express.scatter_3d) or [https://plotly.com/python/reference/scatter3d/](reference/graph_objects/Scatter3d.md) for more information and chart attribute options!
5 changes: 3 additions & 2 deletionsdoc/python/3d-subplots.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
---
description: 3D Subplots in Plotly
---
#### 3D Surface Subplots

### 3D Surface Subplots

```python
import plotly.graph_objects as go
Expand DownExpand Up@@ -47,7 +48,7 @@ fig.update_layout(
fig.show()
```

#### Reference
### Reference


See [https://plotly.com/python/subplots/](subplots.md) for more information regarding subplots!
15 changes: 8 additions & 7 deletionsdoc/python/3d-surface-plots.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,8 @@
description: How to make 3D-surface plots in Python
redirect_from: python/3d-surface-coloring/
---
#### Topographical 3D Surface Plot

### Topographical 3D Surface Plot

```python
import plotly.graph_objects as go
Expand All@@ -21,7 +22,7 @@ fig.update_layout(title=dict(text='Mt Bruno Elevation'), autosize=False,
fig.show()
```

### Passing x and y data to 3D Surface Plot
## Passing x and y data to 3D Surface Plot

If you do not specify `x` and `y` coordinates, integer indices are used for the `x` and `y` axis. You can also pass `x` and `y` values to `go.Surface`.

Expand All@@ -42,7 +43,7 @@ fig.show()
```


#### Surface Plot With Contours
### Surface Plot With Contours


Display and customize contour data for each axis using the `contours` attribute ([reference](reference/graph_objects/Surface.md#plotly.graph_objects.Surface.contours)).
Expand All@@ -66,7 +67,7 @@ fig.update_layout(title=dict(text='Mt Bruno Elevation'), autosize=False,

fig.show()
```
#### Configure Surface Contour Levels
### Configure Surface Contour Levels
This example shows how to slice the surface graph on the desired position for each of x, y and z axis. [contours.x.start](reference/graph_objects/surface-package/contours-package/X.md#plotly.graph_objects.surface.contours.X.start) sets the starting contour level value, `end` sets the end of it, and `size` sets the step between each contour level.

```python
Expand DownExpand Up@@ -95,7 +96,7 @@ fig.update_layout(
})
fig.show()
```
#### Multiple 3D Surface Plots
### Multiple 3D Surface Plots

```python
import plotly.graph_objects as go
Expand DownExpand Up@@ -132,7 +133,7 @@ fig = go.Figure(data=[
fig.show()
```

### Setting the Surface Color
## Setting the Surface Color

You can use the `surfacecolor` attribute to define the color of the surface of your figure. In this example, the surface color represents the distance from the origin, rather than the default, which is the `z` value.

Expand DownExpand Up@@ -161,7 +162,7 @@ fig.update_layout(title_text="Ring cyclide")
fig.show()
```

#### Reference
### Reference


See [https://plotly.com/python/reference/surface/](reference/graph_objects/Surface.md) for more information!
3 changes: 2 additions & 1 deletiondoc/python/LaTeX.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
---
description: How to add LaTeX to python graphs.
---
#### LaTeX Typesetting

### LaTeX Typesetting

Figure titles, axis labels and annotations all accept LaTeX directives for rendering mathematical formulas and notation, when the entire label is surrounded by dollar signs `$...$`. This rendering is handled by the [MathJax library](https://www.npmjs.com/package/mathjax?activeTab=versions), which must be loaded in the environment where figures are being rendered. MathJax is included by default in Jupyter-like environments. When embedding Plotly figures in other contexts it may be required to ensure that MathJax is separately loaded, for example via a `<script>` tag pointing to a content-delivery network (CDN). Versions 2 and 3 are supported.

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp