Skip to content

Commit 7836b86

Browse files
author
Christian Fufezan
committed
resolved conflict. Second conflict was not that straight forward :/
2 parents ee3b430 + b35979e commit 7836b86

File tree

131 files changed

+22544
-9885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+22544
-9885
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88

99
*.coverage
1010

11+
*.tox
12+
1113
build
1214

1315
dist
1416

1517
debug_script.py
1618

17-
test_output.txt
19+
test_output.txt

CHANGELOG.md

Lines changed: 248 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,255 @@ All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## [Unreleased]
6+
### Added
7+
- Support for rendering plots in [nteract](https://nteract.io/)!
8+
See [https://github.com/nteract/nteract/pull/662](https://github.com/nteract/nteract/pull/662)
9+
for the associated PR in nteract.
10+
11+
### Added
12+
- `memoize` decorator added to `plotly.utils`
13+
14+
### Changed
15+
- a `Grid` from `plotly.grid_objs` now accepts a `pandas.Dataframe` as its argument.
16+
- computationally-intensive `graph_reference` functions are memoized.
17+
18+
## [2.0.0] - 2017-01-25
19+
20+
### Changed
21+
- `plotly.exceptions.PlotlyRequestException` is *always* raised for network
22+
failures. Previously either a `PlotlyError`, `PlotlyRequestException`, or a
23+
`requests.exceptions.ReqestException` could be raised. In particular, scripts
24+
which depend on `try-except` blocks containing network requests should be
25+
revisited.
26+
- `plotly.py:sign_in` now validates to the plotly server specified in your
27+
config. If it cannot make a successful request, it raises a `PlotlyError`.
28+
- `plotly.figure_factory` will raise an `ImportError` if `numpy` is not
29+
installed.
30+
- `plotly.figure_factory.create_violin()` now has a `rugplot` parameter which
31+
determines whether or not a rugplot is draw beside each violin plot.
32+
33+
### Deprecated
34+
- `plotly.tools.FigureFactory`. Use `plotly.figure_factory.*`.
35+
- (optional imports) `plotly.tools._*_imported` It was private anyhow, but now
36+
it's gone. (e.g., `_numpy_imported`)
37+
- (plotly v2 helper) `plotly.py._api_v2` It was private anyhow, but now it's
38+
gone.
39+
40+
## [1.13.0] - 2016-12-17
41+
### Added
42+
- Python 3.5 has been added as a tested environment for this package.
43+
44+
### Updated
45+
- `plotly.plotly.create_animations` and `plotly.plotly.icreate_animations` now return appropriate error messages if the response is not successful.
46+
- `frames` are now integrated into GRAPH_REFERENCE and figure validation.
47+
48+
### Changed
49+
- The plot-schema from `https://api.plot.ly/plot-schema` is no longer updated on import.
50+
51+
## [1.12.12] - 2016-12-06
52+
### Updated
53+
- Updated `plotly.min.js` to version 1.20.5 for `plotly.offline`.
54+
- See [the plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md) for additional information regarding the updates
55+
- `FF.create_scatterplotmatrix` now by default does not show the trace labels for the box plots, only if `diag=box` is selected for the diagonal subplot type.
56+
57+
## [1.12.11] - 2016-12-01
58+
### Fixed
59+
- The `link text` in the bottom right corner of the offline plots now properly displays `Export to [Domain Name]` for the given ___domain name set in the users' `.config` file.
60+
61+
## [1.12.10] - 2016-11-28
62+
### Updated
63+
- `FF.create_violin` and `FF.create_scatterplotmatrix` now by default do not print subplot grid information in output
64+
- 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.
65+
66+
### Added
67+
- 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.
68+
- 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).
69+
- `colors.py` file which contains functions for manipulating and validating colors and arrays of colors
70+
- 'scale' param in `FF.create_trisurf` which now can set the interpolation on the colorscales
71+
- 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:
72+
```
73+
import IPython.display
74+
from IPython.display import display, HTML
75+
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
76+
init_notebook_mode(connected=True)
77+
78+
figure_or_data = {'data': [{'x': [1, 2], 'y': [0, 1]}],
79+
'layout': {'xaxis': {'range': [0, 3], 'autorange': False},
80+
'yaxis': {'range': [0, 20], 'autorange': False},
81+
'title': 'First Title'},
82+
'frames': [{'data': [{'x': [1, 2], 'y': [5, 7]}]},
83+
{'data': [{'x': [-1, 3], 'y': [3, 9]}]},
84+
{'data': [{'x': [2, 2.6], 'y': [7, 5]}]},
85+
{'data': [{'x': [1.5, 3], 'y': [7.5, 4]}]},
86+
{'data': [{'x': [1, 2], 'y': [0, 1]}],
87+
'layout': {'title': 'End Title'}}]}
88+
iplot(figure_or_data)
89+
```
90+
More examples can be found at https://plot.ly/python/animations/.
91+
- animations now work in online mode: use `plotly.plotly.create_animations` and `plotly.plotly.icreate_animations` which animate a figure with the `frames` argument. Here is a simple example:
92+
```
93+
import plotly.plotly as py
94+
from plotly.grid_objs import Grid, Column
95+
96+
column_1 = Column([0.5], 'x')
97+
column_2 = Column([0.5], 'y')
98+
column_3 = Column([1.5], 'x2')
99+
column_4 = Column([1.5], 'y2')
100+
101+
grid = Grid([column_1, column_2, column_3, column_4])
102+
py.grid_ops.upload(grid, 'ping_pong_grid', auto_open=False)
103+
104+
# create figure
105+
figure = {
106+
'data': [
107+
{
108+
'xsrc': grid.get_column_reference('x'),
109+
'ysrc': grid.get_column_reference('y'),
110+
'mode': 'markers',
111+
}
112+
],
113+
'layout': {'title': 'Ping Pong Animation',
114+
'xaxis': {'range': [0, 2], 'autorange': False},
115+
'yaxis': {'range': [0, 2], 'autorange': False},
116+
'updatemenus': [{
117+
'buttons': [
118+
{'args': [None],
119+
'label': u'Play',
120+
'method': u'animate'}
121+
],
122+
'pad': {'r': 10, 't': 87},
123+
'showactive': False,
124+
'type': 'buttons'
125+
}]},
126+
'frames': [
127+
{
128+
'data': [
129+
{
130+
'xsrc': grid.get_column_reference('x2'),
131+
'ysrc': grid.get_column_reference('y2'),
132+
'mode': 'markers',
133+
}
134+
]
135+
},
136+
{
137+
'data': [
138+
{
139+
'xsrc': grid.get_column_reference('x'),
140+
'ysrc': grid.get_column_reference('y'),
141+
'mode': 'markers',
142+
}
143+
]
144+
}
145+
]
146+
}
147+
148+
py.create_animations(figure, 'ping_pong')
149+
```
150+
151+
### Fixed
152+
- Trisurf now uses correct `Plotly Colorscales` when called
153+
- Fixed a bug in the format of unique-identifiers in columns of grids that are uploaded to plotly via `plotly.plotly.upload`. See https://github.com/plotly/plotly.py/pull/599 for details. In particular, creating plots that are based off of plotly grids is no longer broken. Here is an example:
154+
155+
```
156+
import plotly.plotly as py
157+
from plotly.grid_objs import Grid, Column
158+
159+
c1 = Column([6, 6, 6, 5], 'column 1')
160+
c2 = Column(['a', 'b', 'c', 'd'], 'column 2')
161+
g = Grid([c1, c2])
162+
163+
# Upload the grid
164+
py.grid_ops.upload(g, 'my-grid', auto_open=False)
165+
166+
# Make a graph that with data that is referenced from that grid
167+
trace = Scatter(xsrc=g[0], ysrc=g[1])
168+
url = py.plot([trace], filename='my-plot')
169+
```
170+
Then, whenever you update the data in `'my-grid'`, the associated plot will update too. See https://plot.ly/python/data-api for more details on usage and examples.
171+
172+
## [1.12.9] - 2016-08-22
173+
### Fixed
174+
- the colorbar in `.create_trisurf` now displays properly in `offline mode`.
175+
176+
### Updated
177+
- 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
178+
- `edges_color` is now a param in `.create_trisurf` which only takes `rgb` values at the moment
179+
180+
## [1.12.8] - 2016-08-18
181+
### Fixed
182+
- 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.
183+
184+
## [1.12.7] - 2016-08-17
185+
### Fixed
186+
- Edited `plotly.min.js` due to issue using `iplot` to plot offline in Jupyter Notebooks
187+
- 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.
188+
189+
## [1.12.6] - 2016-08-09
190+
### Updated
191+
- Updated `plotly.min.js` from 1.14.1 to 1.16.2
192+
- Trace type scattermapbox is now part of the main bundle
193+
- Add updatemenus (aka dropdowns) layout components
194+
- See [the plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md) for additional information regarding the updates
195+
196+
## [1.12.5] - 2016-08-03
197+
### Updated
198+
- `.create_trisurf` now supports a visible colorbar for the trisurf plots. Check out the docs for help:
199+
```
200+
import plotly.tools as tls
201+
help(tls.FigureFactory.create_trisurf)
202+
```
203+
204+
## [1.12.4] - 2016-07-14
205+
### Added
206+
- The FigureFactory can now create 2D-density charts with `.create_2D_density`. Check it out with:
207+
```
208+
import plotly.tools as tls
209+
help(tls.FigureFactory.create_2D_density)
210+
```
211+
212+
## [1.12.3] - 2016-06-30
213+
### Updated
214+
- Updated `plotly.min.js` from 1.13.0 to 1.14.1
215+
- Numerous additions and changes where made to the mapbox layout layers attributes
216+
- Attribute line.color in scatter3d traces now support color scales
217+
- Layout shapes can now be moved and resized (except for 'path' shapes) in editable contexts
218+
- See [the plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#1141----2016-06-28) for additional information regarding the updates
219+
- Updated `default-schema`
220+
221+
### Added
222+
- Added `update_plotlyjs_for_offline` in makefile in order to automate updating `plotly.min.js` for offline mode
223+
224+
## [1.12.2] - 2016-06-20
225+
### Updated
226+
- Updated plotly.min.js so the offline mode is using plotly.js v1.13.0
227+
- Fix `Plotly.toImage` and `Plotly.downloadImage` bug specific to Chrome 51 on OSX
228+
- Beta version of the scattermapbox trace type - which allows users to create mapbox-gl maps using the plotly.js API. Note that scattermapbox is only available through custom bundling in this release.
229+
- See [the plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#1130----2016-05-26) for additional additions and updates.
230+
231+
### Added
232+
- The FigureFactory can now create gantt charts with `.create_gantt`. Check it out with:
233+
```
234+
import plotly.tools as tls
235+
help(tls.FigureFactory.create_gantt)
236+
```
237+
- Ability to download images in offline mode. By providing an extra keyword `image` to the existing plot calls, you can now download the images of the plots you make in offline mode.
238+
239+
### Fixed
240+
- Fixed check for the height parameter passed to `_plot_html`, and now sets the correct `link text` for plots
241+
generated in offline mode.
242+
243+
244+
## [1.12.1] - 2016-06-19
245+
### Added
246+
- The FigureFactory can now create violin plots with `.create_violin`. Check it out with:
247+
```
248+
import plotly.tools as tls
249+
help(tls.FigureFactory.create_violin)
250+
```
6251

7252
## [1.12.0] - 2016-06-06
8253
### Added
9-
- Added ability to enable/disable SSL certificate verification for streaming. Disabling SSL certification verification requires Python v2.7.9 / v3.4.3 (or above). This feature can be toggled via the `plotly_ssl_verification` configuration setting.
254+
- Added ability to enable/disable SSL certificate verification for streaming. Disabling SSL certification verification requires Python v2.7.9 / v3.4.3 (or above). This feature can be toggled via the `plotly_ssl_verification` configuration setting.
10255

11256
## [1.11.0] - 2016-05-27
12257
### Updated
@@ -26,7 +271,7 @@ Note: This is a backwards incompatible change.
26271

27272
- In `create_trisurf`, the parameter `dist_func` has been replaced by `color_func`. Users can now:
28273
- Input a list of different color types (hex, tuple, rgb) to `colormap` to map colors divergently
29-
- Input a list|array of hex and rgb colors to `color_func` to assign each simplex to a color
274+
- Input a list|array of hex and rgb colors to `color_func` to assign each simplex to a color
30275

31276
### Added
32277
- Added the option to load plotly.js from a CDN by setting the parameter `connected=True`
@@ -37,7 +282,7 @@ import plotly.tools as tls
37282
help(tls.FigureFactory.create_trisurf)
38283
```
39284

40-
285+
41286

42287
## [1.10.0] - 2016-05-19
43288
### Fixed

bld.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"%PYTHON%" setup.py install
2+
if errorlevel 1 exit 1
3+
4+
:: Add more build steps here, if they are necessary.
5+
6+
:: See
7+
:: http://docs.continuum.io/conda/build.html
8+
:: for a list of environment variables that are set during the build process.

build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
$PYTHON setup.py install
4+
5+
# Add more build steps here, if they are necessary.
6+
7+
# See
8+
# http://docs.continuum.io/conda/build.html
9+
# for a list of environment variables that are set during the build process.

build_for_conda.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Initial setup was done using:
2+
3+
`conda skeleton pypi plotly --version 1.12.4`
4+
5+
To test all imports, manually added following dependencies at runtime:
6+
```
7+
- matplotlib
8+
- numpy
9+
- ipython
10+
- ipywidgets
11+
```
12+
13+
I also had to change all `module/submodule` in the test imports to `module.submodule`.
14+
15+
Finally, build and test the created version:
16+
17+
`conda build plotly`
18+
19+
Currently, the updated (version 1.12.4) conda package sits at https://anaconda.org/chohner/plotly. There seems to be an old offial package at https://anaconda.org/plotly/plotly.

0 commit comments

Comments
 (0)