-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Can't set numbered subplot axis using update in plotly.py 3.0.0 #1050
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the clear report @slishak. Yeah, looks like the special handling for numbered subplots is missing from the new version of |
It looks like a similar thing happens when adding a Scatterpolar graph to a subplot with FigureWidget. Is this the same problem? |
Note to self: Check if this is related to https://community.plot.ly/t/polar-subplots-in-plotly-py-3-0-0/11722 |
@slishak and @michaelbabyn, see PR #1057 for progress. Thanks! |
* Fix for #1050. Can't create numbered subplots in update * Added missing `mapbox` and `polar` subplot id support (See #1050) * Handle .update on subplots with number 1 (e.g. xaxis1) * Convert plotly objects to dicts before iterating over the in update. This prevents unspecified values from being treated as None and overwriting everything
Fixed in 3.0.2 |
Thanks @jonmmease! |
Looks like there's a little more to this one - I also can't use import plotly.graph_objs as go
layout = go.Layout()
shapes = [
# Line Vertical
{
'type': 'line',
'x0': 1,
'y0': 0,
'x1': 1,
'y1': 2,
'line': {
'color': 'rgb(55, 128, 191)',
'width': 3,
},
},
# Line Horizontal
{
'type': 'line',
'x0': 2,
'y0': 2,
'x1': 5,
'y1': 2,
'line': {
'color': 'rgb(50, 171, 96)',
'width': 4,
'dash': 'dashdot',
},
},
# Line Diagonal
{
'type': 'line',
'x0': 4,
'y0': 0,
'x1': 6,
'y1': 2,
'line': {
'color': 'rgb(128, 0, 128)',
'width': 4,
'dash': 'dot',
},
},
]
layout.update(shapes=shapes)
print(layout.shapes) |
Thanks @slishak , something different is going on here so I'm going to create a new issue |
Hi @slishak , I just pushed out release candidates for plotly.py 3.1.1 and plotlywidget 0.2.1. Installation instructions for the release candidates are at https://github.com/plotly/plotly.py/blob/bc1d4d188ab999cd9c21e3a7908729f156bc200f/README.md. If you have a chance to confirm that this issue is resolved in the release candidate that would be awesome! |
I can create a
Layout
with ayaxis2
attribute using the following methods:but not like this:
because only
xaxis
andyaxis
are valid properties for aLayout
in the schema, so I get aValueError
.The text was updated successfully, but these errors were encountered: