You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+14-2
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,22 @@
2
2
All notable changes to this project will be documented in this file.
3
3
This project adheres to [Semantic Versioning](http://semver.org/).
4
4
5
-
## [6.0.1] - 2025-02-16
5
+
## Unreleased
6
6
7
7
### Fixed
8
-
- Fix `TypeError` when using `orjson` to serialize `pandas.NA`.
8
+
- Fix third-party widget display issues in v6 [[#5102]https://github.com/plotly/plotly.py/pull/5102]
9
+
10
+
## [6.0.1] - 2025-03-14
11
+
12
+
### Updated
13
+
- Updated Plotly.js from version 3.0.0 to version 3.0.1. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#301----2025-02-18) for more information.
14
+
15
+
16
+
### Fixed
17
+
- Fix `TypeError` when using `orjson` to serialize `pandas.NA`[[#5040](https://github.com/plotly/plotly.py/pull/5040)].
18
+
- Fix issue where using `category_orders` on `px.pie` raised `ColumnNotFoundError`[[#5000](https://github.com/plotly/plotly.py/pull/5000)].
19
+
- Fix incorrect `DeprecationWarning` shown when creating a `px` chart [[#5080](https://github.com/plotly/plotly.py/pull/5080), [#5086](https://github.com/plotly/plotly.py/pull/5086)]
Copy file name to clipboardExpand all lines: RELEASE.md
-1
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,6 @@ Publishing to PyPI:
70
70
### Update documentation site
71
71
72
72
1. Search for the previous version string in the docs and replace it with the new version string, including but not necessarily limited to the following files:
73
-
-`doc/python/getting-started.md`
74
73
-`doc/apidoc/conf.py`
75
74
-`doc/requirements.txt`
76
75
2.`doc-prod` should already have been merged on a regular basis into `main`, but
[Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`.
142
-
143
-
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 <aclass="plotly-red"href="https://plotly.com/dash/">Dash Enterprise</a>.**
<divstyle="font-size: 0.9em;"><divstyle="width: calc(100%-30px); box-shadow: none; border: thinsolidrgb(229, 229, 229);"><divstyle="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.
Copy file name to clipboardExpand all lines: doc/python/text-and-annotations.md
+60
Original file line number
Diff line number
Diff line change
@@ -782,6 +782,66 @@ fig.add_annotation(
782
782
783
783
fig.show()
784
784
```
785
+
### Specifying Source Lines or Figure Notes on the Bottom of a Figure
786
+
787
+
This example shows how to add a note about the data source or interpretation at the bottom of the figure. This example aligns the note in the bottom right corner using the title element and container coordinates and then uses an annotation to add a figure title. A near zero container coordinate is an easy and robust way to put text -- such as a source line or figure note -- at the bottom of a figure. It is easier to specify the bottom of the figure in container coordinates than using paper coordinates, since uncertainty about the size of legends and x-axis labels make the paper coordinate of the bottom of the figure uncertain. Making the y container coordinate very slightly positive avoids cutting off the descending strokes of letters like y, p, and q. Only the title command supports container coordinates, so this example re-purposes the title element to insert the note and re-purposes an annotation element for the title. The top of the figure is typically less cluttered and more predictable than the bottom of the figure, so an annotation with its bottom at a paper y-coordinate slightly greater than 1 is a reasonable title location on many graphs.
788
+
789
+
```python
790
+
import plotly.express as px
791
+
df = px.data.iris()
792
+
fig.update_layout(
793
+
title=dict(text="Note: this is the Plotly title element.",
794
+
# keeping this title string short avoids getting the text cut off in small windows
795
+
# if you need longer text, consider 1) embedding your graphic on a web page and
796
+
# putting the note in the HTML to use the browser's automated word wrap,
797
+
# 2) using this approach and also specifying a graph width that shows the whole title,
798
+
# or 3) using <BR> tags to wrap the text onto multiple lines
799
+
yref="container",
800
+
y=0.005,
801
+
# The "paper" x-coordinates lets us align this with either the right or left
802
+
# edge of the plot region.
803
+
# The code to align this flush with the right edge of the plot area is
804
+
# predictable and simple.
805
+
# Putting the title in the lower left corner, aligned with the left edge of the axis labeling would
806
+
# require graph specific coordinate adjustments.
807
+
xref="paper",
808
+
xanchor="right",
809
+
x=1,
810
+
font=dict(size=12)),
811
+
plot_bgcolor="white",
812
+
813
+
# We move the legend out of the right margin so the right-aligned note is
814
+
# flush with the right most element of the graph.
815
+
# Here we put the legend in a corner of the graph region
816
+
# because it has consistent coordinates at all screen resolutions.
817
+
legend=dict(
818
+
yanchor="top",
819
+
y=1,
820
+
xanchor="right",
821
+
x=1,
822
+
borderwidth=1)
823
+
)
824
+
825
+
# Insert a title by repurposing an annotation
826
+
fig.add_annotation(
827
+
yref="paper",
828
+
yanchor="bottom",
829
+
y=1.025, # y = 1 is the top of the plot area; the top is typically uncluttered, so placing
830
+
# the bottom of the title slightly above the graph region works on a wide variety of graphs
831
+
text="This title is a Plotly annotation",
832
+
833
+
# Center the title horizontally over the plot area
f"Plotly version >= 6 requires Jupyter Notebook >= 7 but you have {jupyter_notebook.__version__} installed.\n To upgrade Jupyter Notebook, please run `pip install notebook --upgrade`."
f"Plotly version >= 6 requires JupyterLab >= 3 but you have {jupyter_lab.__version__} installed. To upgrade JupyterLab, please run `pip install jupyterlab --upgrade`."
0 commit comments