How to display automatically interactive plots in Atom/Juno using PyPlot and Julia - matplotlib

I'm using Atom/Juno as IDE for my Julia programming.
I use PyPlot for graphical representation of plots however I noticed two important aspects (I'm migrating from MATLAB)
1- figures do not appear automatically after running julia scripts but only after typing PyPlot.display_figs() in the REPL.
2- figures displayed in Atom are not interactive.
On the contrary, if I open Julia REPL from terminal and I run the same code an interactive window appears (only after typing PyPlot.display_figs()).
Can I use Atom and have interactive plots to appear automatically at the end of each script without everytime using the REPL?

You have two options:
Disable in built Atom plot Pane
Use interactive plotting backend (plotlyjs could be the best option)
Ad.1.
Go in Atom to Seetings->Packages->Julia Client->UI Options and disable the "Enable plot pane" option. Restart Atom.
Ad.2.
With the "Enable plot pane" turned on try running this code:
using Plots
plotlyjs()
Plots.plot(sin.(0:0.1:7))

Related

IPython console: Display plots when using run

I'm using a IPython console (IPython 8.3.0) for running scripts and then use the interactive console to manually inspect variables, try something new, etc.
My problem is with plotting figures - I'm looking for a way to display figures when using e.g. %matplotlib auto and %run myscript.py in the IPython console. I expect the figures drawn in separate windows, not inline.
I'm able to get the behavior I want by using %load myscript.py and executing the code, but this is quickly cluttering the history in the console.
I want to avoid using matplotlib.pyplot.show() in my scripts - if possible.
I there a way to achieve what I want without using %load or show()?

I'm trying to add zoom and save option for my plots in a GUI made using pyqt5

For my plots made using matplotlib I'm trying to add zoom and save options in my GUI. I got to know about Jupyter notebook but I don't know if I can make a GUI in that. Please suggest a way to add these options for my plots in the GUI.

Text Colors in VSC Editor and Terminal - Atom One Theme

Why does VSC (Intellisense?) not recognize certain functions/variables in the Python environment? (see the underlined text in the attached photo). It's working fine for C (using C/C++ extension), otherwise. I am using the Atom One theme and for the C environment every word/command seems to have some color. I tried reinstalling the extensions and going through the settings the best I could, but I can't figure it out.
As a side question, why do I get colored paths in Terminal on my Windows machine (see bottom part of the attached picture), but not on my Mac? Is there some default setting for this that's activated only on Windows? I am a fan of it and I'd like to get my Mac showing some colors too.
Mac:
Regarding the terminal text colors, I found the solution here: Color theme for VS Code integrated terminal.
And here, for more detailed info: https://code.visualstudio.com/api/references/theme-color
As far as variable colors changes for Python, this was useful: Make VSCode Variables have Colour

Matplotlib plot a series of interactve plots one plot at a time

I'm trying to plot a series of plots one plot at a time. When a plot is displayed I want to be able to interact with it (i.e. zoom, pan, etc.) and wait until I'm done before the next plot is displayed.
I saw the post matplotlib plot and then wait for raw input, but I couldn't get it to work.
I'm using Spyder and Python 3.4.
Below is the code snippet of what I'd like to do. However the plots seem to get blocked by the waiting for input.
for i in range(4):
plt.figure()
plt.plot([x for x in range(100)],'x')
plt.show(block=False)
a=input('next plot')
If you are looking for interactive plots in Python, you might want to take a look at the Charts library. It enables you to use the excellent Highcharts javascript library to make beautiful and interactive plots. Highcharts uses the HTML svg tag so all your charts are actually vector images.
Some features:
Vector plots which you can download in .png, .jpg and .svg formats so you will never run into resolution problems
Interactive charts (zoom, slide, hover over points, ...)
Usable in an IPython notebook
Explore hundreds of data structures at the same time using the asynchronous plotting capabilities.
Disclaimer: I'm the developer of the library
I believe this is resolved in the recent matplotlib v.2.0.0 release. At least it resolved this problem for me.

PTVS plotting pandas Dataframes and Series with matplotlib in python debug interactive

Is it possible to plot pandas objects inside the PTVS interactive debugger? Is it possible to save plots to disk as jpeg's?
I think I was able to do this when I first started using PTVS (last year, its awesome by the way!) but I just tried again and I dont get any plots appearing. I cant remember if I had to do something special to get this to work and from doing some google searches I get a confusing picture of the current best practice in this regard.
I want to be able to plot diagrams from my debug interactive window, similar to what is shown on this pandas tutorial.
http://pandas.pydata.org/pandas-docs/stable/visualization.html
Is this possible?
Visual Studio Professional 2013 update 4 (latest I think)
PTVS 2.1.21008.00 (latest I think)
All help is greatly appreciated.
-Jason
[edit: more info on this http://pytools.codeplex.com/discussions/574776 ]
Unfortunately not. The regular interactive has an IPython mode that, among other things, enables inline plots. But the Debug interactive doesn't have that.
You can, of course, still load matplotlib in the Debug interactive and tell it to plot things. But because there's no integration of event loops between it and VS in that mode, the plots will basically work like modal windows - you won't be able to continue debugging or otherwise interact with VS until you close the plot window.