Plotly support

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Plotly support

WingIDE - User mailing list
Hi there,

Recently I've been using a lot of Plotly graphics in my work and so far only in Jupyter notebooks, since I don't know how to get them to display in Wing while debugging.

But I've been wondering if there are any plans to support Plotly plots, so they can be interacted with in WingIDE? I can't find any documentation on this, nor does Google seem to have anything regarding "wingide plotly" 

Regards,
Kevin

_________________________________________________
Wing Python IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: Plotly support

WingIDE - User mailing list
Kevin Dunn via wingide-users wrote:
Recently I've been using a lot of Plotly graphics in my work and so far only in Jupyter notebooks, since I don't know how to get them to display in Wing while debugging.

But I've been wondering if there are any plans to support Plotly plots, so they can be interacted with in WingIDE? I can't find any documentation on this, nor does Google seem to have anything regarding "wingide plotly"

Is the issue that when you use plotly from Wing's Python Shell the iplot() or plot() calls are blocking and not returning to the prompt, or do you mean something else? 

Also, when you tried that did you display the plots in a browser? 

We can look into this in more detail here, but wanted to make sure I'm understanding your question first.

Thanks,

--

Stephan Deibel
Wing Python IDE | The Intelligent Development Environment for Python




_________________________________________________
Wing Python IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: Plotly support

WingIDE - User mailing list
HI Stephan,

I didn't really spend a lot of time looking into making it work, due to time-pressures on a project. 
But the blocking is exactly what was holding it back: "`iplot` can only run inside an IPython Notebook."

I'm not sure how to display the plots in the local browser. I want to use the private poorly code, since the data cannot leave the company premises.

If there are details on how to make it play nicely, like you guys did so well with matplotlib plots, then I'd appreciate it. 
I just quickly Googled on the terms of Wingide and plotly, and since so little came up I thought it was not possible.

But I'd be happy to stand corrected :)

Regards,
Kevin

On Mon, 20 May 2019 at 14:35, Wingware Support <[hidden email]> wrote:
Kevin Dunn via wingide-users wrote:
Recently I've been using a lot of Plotly graphics in my work and so far only in Jupyter notebooks, since I don't know how to get them to display in Wing while debugging.

But I've been wondering if there are any plans to support Plotly plots, so they can be interacted with in WingIDE? I can't find any documentation on this, nor does Google seem to have anything regarding "wingide plotly"

Is the issue that when you use plotly from Wing's Python Shell the iplot() or plot() calls are blocking and not returning to the prompt, or do you mean something else? 

Also, when you tried that did you display the plots in a browser? 

We can look into this in more detail here, but wanted to make sure I'm understanding your question first.

Thanks,

--

Stephan Deibel
Wing Python IDE | The Intelligent Development Environment for Python




_________________________________________________
Wing Python IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: Plotly support

WingIDE - User mailing list
Kevin Dunn wrote:
> I'm not sure how to display the plots in the local browser. I want to
> use the private poorly code, since the data cannot leave the company
> premises.

I've just started looking at it but maybe this is already useful:  You
can plot offline in a web browser (it writes a file to local disk and
opens it with your browser) like this:

import plotly

data = something
plotly.offline.plot(data)

The plot() call does not block and you can interact with the plot in the
browser.

This works both in Wing's debugger (Start/Continue in the Debug menu)
and in the Python Shell (by typing or using Evaluation in Python Shell
items in the Source menu).

There's no way right now to use iplot() with Wing, to get the plots to
appear inline.

--

Stephan Deibel
Wing Python IDE | The Intelligent Development Environment for Python


_________________________________________________
Wing Python IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: Plotly support

WingIDE - User mailing list
Thank you for your help Stephan. Spot-on as usual.

I should have googled a bit more and seen that I could have saved it locally and viewed it in the browser. Works perfectly now.

Regards,
Kevin

On Tue, 21 May 2019 at 01:28, Wingware Support <[hidden email]> wrote:
Kevin Dunn wrote:
> I'm not sure how to display the plots in the local browser. I want to
> use the private poorly code, since the data cannot leave the company
> premises.

I've just started looking at it but maybe this is already useful:  You
can plot offline in a web browser (it writes a file to local disk and
opens it with your browser) like this:

import plotly

data = something
plotly.offline.plot(data)

The plot() call does not block and you can interact with the plot in the
browser.

This works both in Wing's debugger (Start/Continue in the Debug menu)
and in the Python Shell (by typing or using Evaluation in Python Shell
items in the Source menu).

There's no way right now to use iplot() with Wing, to get the plots to
appear inline.

--

Stephan Deibel
Wing Python IDE | The Intelligent Development Environment for Python



_________________________________________________
Wing Python IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: Plotly support

WingIDE - User mailing list
Kevin Dunn wrote:
> Thank you for your help Stephan. Spot-on as usual.
>
> I should have googled a bit more and seen that I could have saved it
> locally and viewed it in the browser. Works perfectly now.

Great, I'm glad that helped!

Stephan Deibel
Wing Python IDE | The Intelligent Development Environment for Python


_________________________________________________
Wing Python IDE users list
http://wingware.com/lists/wingide