I'm trying to solve my problem for a long time but now, I don't know what to do. The problem is - I'm uploading a jupyter notebook on my Github but it is not loading any of the graphs/plots. All the text uploads but not the graphs. I've tried uploading it again and again but I can't seem to find a solution. I've also tried nbviewer but still no luck. Please please help.
The first message that comes after clicking on the notebook is "Sorry, something went wrong. Reload?" after trying for some time the notebook uploads but without GRAPHS!
The first command in my Jupyter notebook is the %matplotlib notebook. This has been working fine but curiously the figures being drawn today are only partial plots. (The inline option without interactivity display complete plots).
When I pan, I can see more sections of the image.
I would like to see the entire plot and I am not sure what has caused this change in display
When image is first displayed it appears like this:
Image created upon running the cell
After panning it appears like this:
New section of image displayed upon panning
NOTE: This started to occur after updating to Matplotlib version 3.3.0.
For the current time I have reverted to Matplotlib version 3.1.0. But if the latest has some dependencies that I am missing which is causing the issue, I would like to learn how to figure those out.
I do not receive any errors or warnings upon import matplotlib or pyplot when working with 3.3.0
This just started happening for some reason...
I know there are some similar posts about this, and they all say, "just use Jupyter Lab!", however, my problem is in Jupyter Lab.
When I plot with pyplot, the cell size doesn't increase to fit the plot:
I just did conda update jupyter lab
%matplotlib inline is the first line in my notebook
Any advice greatly appreciated.
I have a Jupyter notebook (python) where I used plotly express to plot in the notebook for analysis purposes.
I want to share this notebook with non-coders, and have the interactive visuals be available still - but it does not seem to work.
I tried following recommendations made here but even after saving widgets state and using nbconvert, when I open the new HTML file, the visuals are not available.
A sample line of plotting can be seen below:
import plotly_express as px
fig = px.scatter(
df,
x='size',
y='size_y',
color='clients',
hover_data=['id'],
marginal_y="histogram",
marginal_x="histogram"
)
fig.show()
After running plotly.offline.init_notebook_mode() in a cell,
you can export the notebook with full interactivity via the file menu:
File --> Export Notebook as... --> Export Notebook to HTML.
I was having similar issues but with JupyterLab. Followed the instructions here: https://plot.ly/python/renderers/ .
import plotly.io as pio
pio.renderers.keys()
I had to add the following snippet to my script:
import plotly.io as pio
pio.renderers.default = 'jupyterlab'
Exporting as HTML after that worked for me. You can read "Overriding the default renderer".
I suppose you would need
pio.renderers.default = 'notebook'
You can specify the default renderers from plotly with:
import plotly.io as pio
pio.renderers.default = 'pdf'
or when displaying the images with:
fig.show(renderer="pdf")
The 2 choices for you are:
'notebook': work well with jupyter notebook;
'pdf': perfect when using nbconvert to convert to HTML or LATEX
You can also join the 2 with "notebook+pdf" so you have iterative plots when running the notebook and static images when converting with nbconvert.
I just had a problem that resulted in this error message.
nbconvert/filters/widgetsdatatypefilter.py:69: UserWarning: Your element with mimetype(s) dict_keys(['application/vnd.plotly.v1+json']) is not able to be represented.
warn("Your element with mimetype(s) {mimetypes}"
Google brought me here, but I could not find a solution from the answers above.
I'm sharing the setup which caused my problem and the solution.
I was running the notebook in VS Code and then on the command line using: jupyter nbconvert
To solve it, I had to start jupyter lab and then run it and save it before running nbconvert.
I am using tensorflow on jupyter notebook. I have no problems using tensorflow, but when I try to display tensorboard using the "show_graph" function (it was referenced here: Simple way to visualize a TensorFlow graph in Jupyter?), all it showed is a blank space. My classmates who ran the same code had no problem opening the tensorboard.
My system is Win 10. I am new to jupyter notebook and tensorflow so I don't know what to do for troubleshooting.