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: doc/python/time-series.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -85,19 +85,19 @@ fig.show()
85
85
86
86
### Configuring Tick Labels
87
87
88
-
By default, the tick labels (and optional ticks) are associated with a specific grid-line, and represent an *instant* in time, for example, "midnight on February 1, 2018". Tick labels can be formatted using the `tickformat` attribute (which accepts the [d3 time-format formatting strings](https://github.com/d3/d3-time-format)) to display only the month and year, but they still represent an instant by default, so in the figure below, the text of the label "Feb 2018" spans part of the month of January and part of the month of February. The `dtick` attribute controls the spacing between gridlines, and the `"M1"` setting means "1 month". This attribute also accepts a number of milliseconds, which can be scaled up to days by multiplying by `24*60*60*1000`.
88
+
By default, the tick labels (and optional ticks) are associated with a specific grid-line, and represent an *instant* in time, for example, "00:00 on February 1, 2018". Tick labels can be formatted using the `tickformat` attribute (which accepts the [d3 time-format formatting strings](https://github.com/d3/d3-time-format)) to display only the month and year, but they still represent an instant by default, so in the figure below, the text of the label "Feb 2018" spans part of the month of January and part of the month of February. The `dtick` attribute controls the spacing between gridlines, and the `"M1"` setting means "1 month". This attribute also accepts a number of milliseconds, which can be scaled up to days by multiplying by `24*60*60*1000`.
89
89
90
90
Note that by default, the formatting of values of X and Y values in the hover label matches that of the tick labels of the corresponding axes, so when customizing the tick labels to something broad like "month", it's usually necessary to [customize the hover label](/python/hover-text-and-formatting/) to something narrower like the acutal date, as below.
91
91
92
92
```python
93
93
import plotly.express as px
94
94
df = px.data.stocks()
95
-
fig = px.line(df, x="date", y=df.columns,
96
-
hover_data={"date": "|%B %d, %Y"},
95
+
fig = px.line(df, x="date", y=df.columns,
96
+
hover_data={"date": "|%B %d, %Y"},
97
97
title='custom tick labels')
98
98
fig.update_xaxes(
99
-
dtick="M1",
100
-
tickformat="%b %Y",
99
+
dtick="M1",
100
+
tickformat="%b %Y",
101
101
range=["2018-01-01", "2018-12-31"])
102
102
fig.show()
103
103
```
@@ -111,12 +111,12 @@ By setting the `ticklabelmode` attribute to `"period"` (the default is `"instant
111
111
```python
112
112
import plotly.express as px
113
113
df = px.data.stocks()
114
-
fig = px.line(df, x="date", y=df.columns,
115
-
hover_data={"date": "|%B %d, %Y"},
114
+
fig = px.line(df, x="date", y=df.columns,
115
+
hover_data={"date": "|%B %d, %Y"},
116
116
title='custom tick labels with ticklabelmode="period"')
1. Go to https://github.com/plotly/plotly.py/releases and "Draft a new release"
116
+
2. Enter the `vX.Y.Z` tag you created already above and make "Release title" the same string as the tag.
117
+
3. Copy the changelog section for this version as the "Describe this release"
118
+
119
+
### Update documentation site
120
+
121
+
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:
122
+
-`README.md`
123
+
-`doc/python/getting-started.md`
124
+
-`doc/apidoc/conf.py`
125
+
-`doc/requirements.txt`
126
+
-`binder/requirements.txt`
127
+
2.`doc-prod` should already have been merged on a regular basis into `master`, but
128
+
start by doing it first if not. Then merge `master` into `doc-prod` to deploy the doc related
129
+
to features in the release.
130
+
3. in a clone of the [`graphing-library-docs` repo](https://github.com/plotly/graphing-library-docs):
131
+
1. bump the version of Plotly.js with `cd _data && python get_plotschema.py` fixing any errors that come up
132
+
2. rebuild the Algolia `schema` index with `ALGOLIA_API_KEY=<key> make update_ref_search`
133
+
3. Rebuild the Algolia `python` index with `ALGOLIA_API_KEY=<key> make update_python_search`
134
+
4. Commit and push the changes to `master` in that repo
135
+
136
+
### Notify Stakeholders
137
+
138
+
* Post an announcement to the Plotly Python forum, with links to the README installation instructions and to the CHANGELOG.
139
+
* Follow up on issues resolved in this release or forum posts with better answers as of this release
140
+
141
+
## Release *Candidate* process - `plotly` package
56
142
57
-
Commit Changelog, README and getting-started updates.
58
143
59
144
### Bump to release candidate version
60
145
@@ -68,7 +153,7 @@ specified below.
68
153
+ Ensure you're using `node` version 12 and `npm` version 6 to minimize diffs to `package-lock.json`
69
154
+ Run `rm -rf node_modules && npm install && npm run build`
Go to https://github.com/plotly/plotly.py/releases and "Draft a new release"
268
-
269
-
Enter the vX.Y.Z tag
270
-
271
-
Make "Release title" the same string as the tag.
272
-
273
-
Copy changelog section for this version as the "Describe this release"
274
-
275
-
### Update documentation site
276
-
277
-
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:
278
-
-`README.md`
279
-
-`doc/python/getting-started.md`
280
-
-`doc/apidoc/conf.py`
281
-
-`doc/requirements.txt`
282
-
-`binder/requirements.txt`
283
-
2.`doc-prod` should already have been merged on a regular basis into `master`, but
284
-
start by doing it first if not. Then merge `master` into `doc-prod` to deploy the doc related
285
-
to features in the release.
286
-
3. in a clone of the [`graphing-library-docs` repo](https://github.com/plotly/graphing-library-docs):
287
-
1. bump the version of Plotly.js with `cd _data && python get_plotschema.py` fixing any errors that come up
288
-
2. rebuild the Algolia `schema` index with `ALGOLIA_API_KEY=<key> make update_ref_search`
289
-
3. Rebuild the Algolia `python` index with `ALGOLIA_API_KEY=<key> make update_python_search`
290
-
4. Commit and push the changes to `master` in that repo
291
-
292
-
### Post announcement
293
-
294
-
Post an announcement to the Plotly Python forum, with links to the
295
-
README installation instructions and to the CHANGELOG.
296
-
297
257
## Release process - `plotly-geo` package
298
258
299
259
The `plotly-geo` package contains the shape file resources used by plotly.py.
0 commit comments