Skip to content

Cone not working properly? #1051

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

Closed
jzthree opened this issue Jul 8, 2018 · 11 comments
Closed

Cone not working properly? #1051

jzthree opened this issue Jul 8, 2018 · 11 comments
Labels
bug something broken
Milestone

Comments

@jzthree
Copy link

jzthree commented Jul 8, 2018

Thanks for implementing the feature. I have been having some difficulties in reproducing the notebook https://plot.ly/python/3d-cone/ or tried to use ploly.graph_objs.Cone.

With iplot it shows a plot with 2D layout like scatter while 3d is expected.
With plot to save to a file and open it with chrome. It shows an empty grid.

Also "Edit in Chart Studio" button does not work for me in either case.

I have verified that I am using 3.0.0 version, and the html files says plotly.js 1.38.3. I have been mostly following the notebook except for using plotly.offline.plot and iplot instead.

@jonmmease
Copy link
Contributor

Thanks for the report @jzthree.

What I'm seeing is that I can reproduce the plot in the documentation as long as the validate=False param is set. But, if I don't set validate to False I see the empty grid. I think I've tracked down the empty grid problem to an issue with our code generation logic (Note to self: we codegen a temporary variable named v in the constructor of each graph obj that is conflicting with the v property of cone).

Could you add a screenshot of the 2D layout you're seeing?

Cone is a fairly new trace, so my guess is that Chart studio hasn't been updated yet.

I'll fix the code generation bug next week, and at that point I'll check on the status of chart studio support for the cone trace.

Thanks!

@jonmmease jonmmease added the bug something broken label Jul 9, 2018
@jzthree
Copy link
Author

jzthree commented Jul 11, 2018

Thanks for looking into this! This is what i got

image

from plotly.offline import  init_notebook_mode, plot, iplot
import plotly.graph_objs as go
init_notebook_mode()

data = [{
    'type': 'cone',
    'x': [1], 'y': [1], 'z': [1],
    'u': [1], 'v': [1], 'w': [0]
}]

layout = {
    'scene': {
      'camera': {
        'eye': {'x': -0.76, 'y': 1.8, 'z': 0.92}
      }
    }
}

fig = {"data": data, "layout": layout}
iplot(fig, filename='cone-basic', validate=False)

jonmmease added a commit that referenced this issue Jul 17, 2018
…race) (#1060)

There was a variable name conflict in the code generated in the constructor of each trace.
See #1051
@jonmmease
Copy link
Contributor

@jzthree Can you try this out with the new version 3.0.1?

@jzthree
Copy link
Author

jzthree commented Jul 17, 2018

Thanks. Now using plotly.offline.plot to save to a html file works perfectly, but plotly.offline.iplot still behaves like the above image I had.

@jonmmease
Copy link
Contributor

If plotly.offline.plot works but plotly.offline.iplot doesn't, it's probably a Plotly.js version difference. You can try out master (which was updated with the latest Plotly.js version this morning), or we can check in on this again when 3.1 is released.

@jonmmease jonmmease added this to the v3.1.0 milestone Jul 21, 2018
@jonmmease
Copy link
Contributor

Hi @jzthree , could you try the plotly.offline.iplot approach again with version 3.1.0?

@jzthree
Copy link
Author

jzthree commented Jul 21, 2018

Thanks for the quick update! I still have the same problem with 3.1.0 though...
image

@jonmmease
Copy link
Contributor

Oh wait, what interface are you using? That doesn't look like Jupyter notebook/lab.

@jzthree
Copy link
Author

jzthree commented Jul 21, 2018

Oh I just tried jupyter notebook and that works (see below)
image

The plot I showed before was nteract (see below).

image
I also used Atom+Hydrogen and it had the same problem, so I never thought it would be interface-dependent- sorry. I don't have enough expertise to tell whether this shoud be an issue for nteract @rgbkrk. Shoud we close this issue?

@jonmmease
Copy link
Contributor

It might be a matter of what version of plotly.js is bundled with nteract.

@rgbkrk is the plotly.js version that nteract includes based on the version in https://github.com/nteract/minimal-plotly? If so, that would be version 1.25.0, which would explain the issue since cone traces were added in 1.39.0.

@jonmmease
Copy link
Contributor

I'm going to close this for now since I don't think it's something we can fix in plotly.py. I'd recommend filing an issue on the nteract side. Feel free to reopen if it turns out there is something we can do.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

2 participants