As you can see on the image posted below, for some reason the notebook doesn't want to properly display a figure while using the interactive matplotlib interface - the %matplotlib notebook and it only prints the top left corner of the wanted plot. I've browsed the Internet, mostly this forum but I haven't found solution either, so I've got no other choice than to make a post about it.
If I switch it back to classic %matplotlib inline, I've got no issues and the figure is displayed correctly. I'd really appreciate any help you can offer, it drives me crazy because I need to properly display these interactive plots, in order to learn from other notebooks which use them. So I'm not searching for any other alternatives to using interactive figures, but I'd preferably want this particular issue to be resolved.
Thank you.
This was rather a quick solution to my suprise. I was even thinking of pulling this question off the site, since I resolved this quite promptly, but then again you never know, someone might end up with the very same problem as I encountered before.
So anyway, changing the browser does the trick. At least in my case changing from Chrome to Firefox solved this issue of mine.
Related
I am using Jupyter notebook on my laptop (the version coming with Anaconda) to perform some sensitivity analysis.
I use plotly to display the results and I like the interactive features that it has.
However, when I am trying to display more than 7/8 interactive plots on the same notebook, some plots disappears and the output cells of those plots go crazy (see picture attached).
Issue with plotly
A solution I found was to disable the interactive feature at least for some of the plots, changing the diplay mode in config as:
config = {'staticPlot': True}
fig.show(config=config)
This method works, however, I like the feature and I was wondering if there was a solution that does not imply disabling the interactive view.
I read about this post where they say it might be a memory issue (even though their graphs are going blank while mine are behaving crazy):
Plotly: How to prevent graphs from going blank when there are too many interactive plots?
However I did not manage to find/change the jupyter configuration file, maybe because I installed it via Anaconda?
I was also wondering if someone experienced exactly the same or there might be a simpler solution to this issue.
Thanks a lot in advance
I believe that in the second link the config file should be generated if not existing.
You can also try changing to gl rendering:
https://plotly.com/python/webgl-vs-svg/
when I try to write any code jupyter notebook automatically paste any irrelevant / sometimes relevant program between the program, but I want to stop this shit, because it is irritating me. suggestions are different things. but this issue has arrived in my notebook for the past few days.you can see in this link exactly what happening in this link
how can I get rid of it? please help me out. The error lines are in green color whereas normal program looks like thisSee this line in grey color is suggested by notebook
I am just confused. I don't know how it started. I didn't get any solution on it anywhere
looks like https://discourse.jupyter.org/t/jupyter-notebooks-annoying-grey-text-auto-show/16886/5, This is most likely a browser issue, what browser are you using? any extentions that could cause this? maybe try switching browsers?
I'm currently using Jupytor Notebook on VSC. I found it very uncomfortable when very long result come out because I have to scroll down a long way to go the the next cell, like shown in the picture.
So I was wondering if there is a way to make the result like the original Jupyter Notebook, where they have a separate scroll for the result as shown below.
As an additional question, anyone know how to search for certain words in the result on VSC? ctrl+f only searches for words in the coding cells and not the result.
A work around for the scroll wheel if you don’t want to collapse the code is to add a print statement to the beginning and end of the code block as mentioned in Collapse Output in VS Code Jupyter Into Scrollable Window. I have not been at my computer to test this and this post is from a year ago, so I’m not sure if this solution is still working. EDIT: This solution is no longer working keep an eye on the linked issue for the resolution.
This was also brought up as an issue on GitHub and it was closed saying they have no plans to work on it currently.
#118117
As for the searching in outputs, this is an open issue currently on GitHub: #94239
Scrollable output regions would be handled in VS Code core. This function has not been decided on GitHub at present
For your additional question, I think the filter feature in the search widget might be what you're looking for - you can include outputs with that.
I use the IPython shell fairly often and have just started to notice it giving me strange autocomplete suggestions without any prompting from me. In this example, I just typed "im" and it suggests importing matplotlib?
This is very strange for several reasons: I've never seen this kind of grayed out code suggestion before that appears just as I type without the need to press tab or anything like that, the suggestions seem to be very arbitrary (why would typing im mean I want to import matplotlib of all things) and sometimes the suggestions make so sense (image 2: it just asks me to run plt.show() even though I haven't plotted anything yet).
Any clues to what could be going on here?
Try this.
import IPython
terminal = IPython.get_ipython()
terminal.pt_app.auto_suggest = None
https://github.com/ipython/ipython/issues/13451
I remember that I saw some code from the web that has little arrows in front of each line to identify its number of indents, which turned out to be very helpful when the code is long. But I can't find that web page anymore so I wonder if anyone knows how to add that kind of indicator in Jupyter Notebook? Thanks!