How can you reopen the plots pane in spyder? - python

On installing Spyder, I deleted the help and plots pane in the top right hand corner of Spyder, leaving only the console on the right. Does anyone know how to reopen these panes after removing them?
thanks
My current console

In the top bar open View > Panes and check Plots.
Also, shortcut Ctrl+Shift+G should also open the Plots window.

Update: I was able to solve this (Jakub Holan has the best answer to try first, but it didn't work for me). Even a soft setting reset from inside spyder didn't work. The solution was to close Spyder, search for "reset spyder settings" in windows navigation search, and open the "reset spyder settings" file.

Related

Youcompleteme function preview popup balloon in new version

In the most recent version of YCM, I am getting this kind of popup balloons every time I open a function bracket in Python. I find it quite annoying and the automatic close mechanism often fails and leaves the popup on the screen.
Where is this coming from? I could not find anything from Vim logs about this popup, but did try to disable YCM and the popup disappeared.
I have tried to set
set completeopt-=preview
but the issue persists.
How to disable this functionality?
Add let g:ycm_auto_hover='' in your .vimrc file. Note that it will not work if you just type this in your vim command mode. It must be add into vimrc file and restart vim.

I can't see plot in the console [duplicate]

using Spyder 4 which is no longer displaying the Plots pane above the console. I have ensured that the backend is set to Inline but the pane still does not show up.
If anyone knows any solutions, it would be greatly appreciated.
(Spyder maintainer here) You need to go the menu View > Panes and activate the entry corresponding to the Plots pane.

VSCode Jupyter: is there a way to make python interactive window work as default console?

I've recently switched to VSCode, and am wondering if there's a way to make the Python Interactive Window from the Jupyter support in VSCode work like the console in Spyder where I just have to select code and press ctrl+enter to send it, without having to create cells everytime.
For now I'm resigned to work with the Terminal until my code is clean and then create a cell when I have reusable code, and would like to just work directly with the PIW.
You can always change the default console setting by:
Opening the Command Palette (⇧⌘P)
Typing "Preferences:Open Settings (JSON)
Edit this line:
"python.dataScience.sendSelectionToInteractiveWindow": false
You should be able to do this with the latest python extension. The select the code you want to execute and press shift-enter. Is that not working?
For me (now) interactive mode runs after setting "jupyter.sendSelectionToInteractiveWindow": true
#FranciscoRZ. You should have seen a popup option for this, but if it didn't come up for you it can just be manually set in VSCode options. Just change this guy here:
Python->Data Science: Send Selection To Interactive Window
That should get you what you are looking for.
OP's Note: Accepting this answer because it will be the right anwser starting with the February release of VS Code Python
If you have the notebook saved as a python percentage script (which is more git friendly)
each "cell" will be delimited by # %% and the default run command is "Shift+Ctrl".
Later once you are working in the interactive window, If you want a particular cell you wrote on the fly to be in you script, there is one button which says "Paste code into file" right next to the recently executed cell in the interactive window.
And in case you are using the notebook for the sake of being able to later export it to html or pdf, once executed in the interactive window, there is an export button as well.

How to reinitialize the Python console in PyCharm?

I've seen other IDEs have the option to right click and reinitialize the environment. Does anyone know if this is possible in PyCharm, and if so, how it's done?
There is a little reset button (small square with a curved green arrow can be seen above) on the top left of the console that says "Rerun" as the tool tip; this seems to reset the console.
If you can't see the button, the Toolbar might be hidden. To get the Toolbar you need to right click on the "Python Console" tab, and click on "Show Toolbar"
The other answer is correct, I'm adding a new answer on how to create a shortcut for re-running the console. By default, it doesn't have any shortcut, but you can add it by mapping it in Keymap.
Open Preferences (in Mac: Cmd+,) and search for "rerun"
Add the keyboard shortcut for Rerun by double-clicking the "Rerun" line. As you can see from the image below, I assign Cmd+Shift+O for it.
Now you can rerun the console by using the shortcut and don't have to use your mouse anymore.
Please note that this button does not reset all the variables. But then you can enter in the command prompt: reset.
I had tried "rerun" and found that it didn't reload the new environment.
I suggest that "new console" button could help you to reload the environment that it had installed the new packages.

Lost My "Output" Window

I am sure I am using incorrect terminology, but hopefully you can grasp my meaning. I am working with Spyder python 2.7, and I have somehow lost my "output" window. I attached a screen shot. Formerly, there was a window, that, after having run my code, gave me the results of my code. How do I get this window back? I went to the view options, but had no such luck.
(Spyder dev here) You have two options to make your console back (that's the right name of what you called as output window :)
Go to the View Menu and there from to Windows and toolbars and select either Console or IPython console.
If this doesn't solve your problem, just open a Windows terminal (i.e. cmd.exe from the Start > Run Window menu) and in it run this comnmand:
spyder --reset
and then restart Spyder again. That should solve your problem for sure.

Categories

Resources