Skip to content

Commit 7624c02

Browse files
committed
Merge branch 'master' into fix-plot-other-domain
2 parents 58805aa + 81315f7 commit 7624c02

File tree

2 files changed

+47
-29
lines changed

2 files changed

+47
-29
lines changed

CHANGELOG.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,37 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## [Unreleased]
66

7-
## [1.12.10] - 2016-11-23
7+
## [1.12.10] - 2016-11-28
88
### Updated
99
- `FF.create_violin` and `FF.create_scatterplotmatrix` now by default do not print subplot grid information in output
10+
- Removed alert that occured when downloading plot images offline. Please note: for higher resolution images and more export options, consider making requests to our image servers. See: `help(py.image)` for more details.
1011

1112
### Added
12-
- Plot configuration options for offline plots. See the list of [configuration options](https://github.com/Rikorose/plotly.py/blob/master/plotly/offline/offline.py#L189) and [examples](https://plot.ly/javascript/configuration-options/) for more information.
13+
- Plot configuration options for offline plots. See the list of [configuration options](https://github.com/Rikorose/plotly.py/blob/master/plotly/offline/offline.py#L189) and [examples](https://plot.ly/javascript/configuration-options/) for more information.
1314
- Please note that these configuration options are for offline plots ONLY. For configuration options when embedding online plots please see our [embed tutorial](http://help.plot.ly/embed-graphs-in-websites/#step-8-customize-the-iframe).
1415
- `colors.py` file which contains functions for manipulating and validating colors and arrays of colors
1516
- 'scale' param in `FF.create_trisurf` which now can set the interpolation on the colorscales
17+
- animations now work in offline mode. By running `plotly.offline.plot()` and `plotly.offline.iplot()` with a `fig` with `frames`, the resulting plot will cycle through the figures defined in `frames` either in the browser or in an ipython notebook respectively. Here's an example
18+
```
19+
import IPython.display
20+
from IPython.display import display, HTML
21+
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
22+
init_notebook_mode(connected=True)
23+
24+
figure_or_data = {'data': [{'x': [1, 2], 'y': [0, 1]}],
25+
'layout': {'xaxis': {'range': [0, 3], 'autorange': False},
26+
'yaxis': {'range': [0, 20], 'autorange': False},
27+
'title': 'First Title'},
28+
'frames': [{'data': [{'x': [1, 2], 'y': [5, 7]}]},
29+
{'data': [{'x': [-1, 3], 'y': [3, 9]}]},
30+
{'data': [{'x': [2, 2.6], 'y': [7, 5]}]},
31+
{'data': [{'x': [1.5, 3], 'y': [7.5, 4]}]},
32+
{'data': [{'x': [1, 2], 'y': [0, 1]}],
33+
'layout': {'title': 'End Title'}}]}
34+
iplot(figure_or_data)
35+
```
36+
More examples can be found at https://plot.ly/python/animations/.
37+
- Upcoming animations in online mode: use `plotly.plotly.create_animations()` and `plotly.plotly.icreate_animations()` which animate a figure with the `frames` argument.
1638

1739
### Fixed
1840
- Trisurf now uses correct `Plotly Colorscales` when called
@@ -26,7 +48,7 @@ c1 = Column([6, 6, 6, 5], 'column 1')
2648
c2 = Column(['a', 'b', 'c', 'd'], 'column 2')
2749
g = Grid([c1, c2])
2850
29-
# Upload the grid
51+
# Upload the grid
3052
py.grid_ops.upload(g, 'my-grid', auto_open=False)
3153
3254
# Make a graph that with data that is referenced from that grid
@@ -40,17 +62,17 @@ Then, whenever you update the data in `'my-grid'`, the associated plot will upda
4062
- the colorbar in `.create_trisurf` now displays properly in `offline mode`.
4163

4264
### Updated
43-
- the colorbar in `.create_trisurf` now displays the appropriate max and min values on the ends of the bar which corresponding to the coloring metric of the figure
65+
- the colorbar in `.create_trisurf` now displays the appropriate max and min values on the ends of the bar which corresponding to the coloring metric of the figure
4466
- `edges_color` is now a param in `.create_trisurf` which only takes `rgb` values at the moment
4567

4668
## [1.12.8] - 2016-08-18
4769
### Fixed
48-
- Fixed color bug with trisurf plots where certain triangles were colored strangely. The coordinates of `rgb(...)` are now rounded to their nearest integer (using Python3 method of rounding), then placed in the color string to fix the issue.
70+
- Fixed color bug with trisurf plots where certain triangles were colored strangely. The coordinates of `rgb(...)` are now rounded to their nearest integer (using Python3 method of rounding), then placed in the color string to fix the issue.
4971

5072
## [1.12.7] - 2016-08-17
5173
### Fixed
5274
- Edited `plotly.min.js` due to issue using `iplot` to plot offline in Jupyter Notebooks
53-
- Please note that `plotly.min.js` may be cached in your Jupyter Notebook. Therefore, if you continue to experience this issue after upgrading the Plotly package please open a new notebook or clear the cache to ensure the correct `plotly.min.js` is referenced.
75+
- Please note that `plotly.min.js` may be cached in your Jupyter Notebook. Therefore, if you continue to experience this issue after upgrading the Plotly package please open a new notebook or clear the cache to ensure the correct `plotly.min.js` is referenced.
5476

5577
## [1.12.6] - 2016-08-09
5678
### Updated

plotly/offline/offline.py

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,17 @@ def get_image_download_script(caller):
7171
raise ValueError('caller should only be one of `iplot` or `plot`')
7272

7373
return(
74-
('<script>'
75-
'function downloadimage(format, height, width,'
76-
' filename) {{'
77-
'var p = document.getElementById(\'{plot_id}\');'
78-
'Plotly.downloadImage(p, {{format: format, height: height, '
79-
'width: width, filename: filename}});'
80-
'}};' +
81-
check_start +
82-
'if(confirm(\'Do you want to save this image as '
83-
'{filename}.{format}?\\n\\n'
84-
'For higher resolution images and more export options, '
85-
'consider making requests to our image servers. Type: '
86-
'help(py.image) for more details.'
87-
'\')) {{'
88-
'downloadimage(\'{format}\', {height}, {width}, '
89-
'\'{filename}\');}}' +
90-
check_end +
91-
'</script>'
92-
)
74+
('<script>'
75+
'function downloadimage(format, height, width,'
76+
' filename) {{'
77+
'var p = document.getElementById(\'{plot_id}\');'
78+
'Plotly.downloadImage(p, {{format: format, height: height, '
79+
'width: width, filename: filename}});}};' +
80+
check_start +
81+
'{{downloadimage(\'{format}\', {height}, {width}, '
82+
'\'{filename}\');}}' +
83+
check_end +
84+
'</script>')
9385
)
9486

9587

@@ -311,7 +303,9 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
311303
image (default=None |'png' |'jpeg' |'svg' |'webp') -- This parameter sets
312304
the format of the image to be downloaded, if we choose to download an
313305
image. This parameter has a default value of None indicating that no
314-
image should be downloaded.
306+
image should be downloaded. Please note: for higher resolution images
307+
and more export options, consider making requests to our image servers.
308+
Type: `help(py.image)` for more details.
315309
filename (default='plot') -- Sets the name of the file your image
316310
will be saved to. The extension should not be included.
317311
image_height (default=600) -- Specifies the height of the image in `px`.
@@ -422,9 +416,11 @@ def plot(figure_or_data, show_link=True, link_text='Export to plot.ly',
422416
image (default=None |'png' |'jpeg' |'svg' |'webp') -- This parameter sets
423417
the format of the image to be downloaded, if we choose to download an
424418
image. This parameter has a default value of None indicating that no
425-
image should be downloaded.
426-
image_filename (default='plot_image') -- Sets the name of the file your image
427-
will be saved to. The extension should not be included.
419+
image should be downloaded. Please note: for higher resolution images
420+
and more export options, consider making requests to our image servers.
421+
Type: `help(py.image)` for more details.
422+
image_filename (default='plot_image') -- Sets the name of the file your
423+
image will be saved to. The extension should not be included.
428424
image_height (default=600) -- Specifies the height of the image in `px`.
429425
image_width (default=800) -- Specifies the width of the image in `px`.
430426
"""

0 commit comments

Comments
 (0)