Viewing graphs in Jupyter or IPython - matplotlib

I am trying to use both bokeh and matplotlib in my IPython notebook... Neither work perfectly.
Attached is a screen shot of Bokeh. Matplotlib explanation is below.
Here are my system specs:
-Windows 7 with Vagrant
-Jupyter/IPython
BOKEH -- buttons are static images; there is no resizing, yet the graph is interactive
Should look like from this website: http://docs.bokeh.org/en/latest/docs/quickstart.html
MATPLOTLIB -- only static shots appear when it should be zoomable, etc (like bokeh)

1) read the documentation.
you would only change output_file() to a call to output_notebook() instead.
Which you did not seem to do above.
2) Why should it ? What di you do to make it zoomable ?
3) try not to post 2 unrelated question at the same time.

You appear to be using an older version of Bokeh. The issue with the CSS problems (button appearance) has been fixed for some time. As mentioned above, you will need to execute output_notebook() to load Bokeh for IPython notebook usage. For future reference, questions like this greatly benefit from providing as much information as possible (e.g., Bokeh and browser versions, platform information, etc.) Without that information it is impossible to diagnose problems with any certainty.

Related

What does Jupyter notebook call when it presents a matplotlib image?

In Jupyter, if the last statement in a cell returns a matplotlib.Figure, the figure is displayed.
One can perform a similar trick with custom classes by providing a _repr_png_ function in that class. However, matplotlib Figures do not provide this function. This makes me wonder. How does Jupyter "know" what to do with a matplotlib figure?
How does Jupyter "know" what to do with a matplotlib figure?
In the inline backend, this is achieved by registering a function to show changed figures (flush_figures) with the post_execute event in IPython, see configure_inline_support.

Hicharts graph zoom on react native

I used Highcharts on my project in mobile react native and found after trying to pinch-to-zoom on graph x-axis and y-axis are not refreshing to shows smaller x-coordinate numbers.
However when I used to work in Expo, it was properly worked and showing correct number during pinch-to-zoom.
Please advise if you ran into same issue and how you fixed it? I am guessing there should be an event needs to be trigger to refresh charts.
Tried to use Highcharts zoon feature on react native code for my graph, expecting to see smaller numbers of X and Y axis on graph after pinch-to -zoom
I have found, that you have already asked your question on Freshdesk, our support channel. In the future, please do not duplicate topics across our support channels, as we work as a single team of developers.
The React-Native package is deprecated, so that means, that we dropped support for that package, and it now is in hands of the community. If you need any support with this package, you can create an Issue in GitHub and might find some help there. Alternatively, you can try to search for some new package, which is not official. On the other hand, you can try to use methods, like chart.redraw (https://api.highcharts.com/class-reference/Highcharts.Chart#redraw) or chart.reflow (https://api.highcharts.com/class-reference/Highcharts.Chart#reflow) - they are responsible for redrawing/reflowing the chart, which will refresh the chart.

Matplotlib figure looks different when saved, compared to rendered in jupyter notebook

I am using seaborn style darkgrid. When I render the figure in jupyter it looks great. But when I save it with savefig(figure.jpeg, dpi=300). The colors of the grid are bad. Funny, when I upload the figure here, it looks good again. What is going on? And when I drop it in Chrome it looks bad. Is this a transparency issue? It is mainly the darker area in the background that is affected.
%pylab inline
import seaborn as sns
sns.set_style('darkgrid')
plot(something)
I would like to save the figure as it is displayed in the jupyter notebook so I can use it in other applications. What does the browser, what other image viewers don't have?
I tried formats jpeg and png. And saved the figure with transparency=True and transparency=False.

Missing Widgets in GNU radio companion (GRC)

I have started using GNU radio and was following this YouTube tutorial series to get familiar with GRC.
While following along with the tutorials I noticed that I am missing many of the GUI widgets that the tutor was using, for example, the variable slider widget.
I realise that the blocks ultimately translate to some python code, and we could create our own widgets, but the issue is with missing default widgets.
It may be relevant to state here that the software was installed using the synaptic package manager following the instructions given here.
Is there a fix for this? Maybe some more packages available on Synaptic?
In your linked tutorial, I believe that wx widgets are used. These are deprecated and you should swap to a Qt gui top_block. To get the slider he used, you may stick to a WX GUI Slider or use a QT GUI Range block, depending on whether your flowgraph is in wx or qt

Add custom title text to jupyter notebook interface

I frequently run jupyter notebook on multiple servers/computers, and it would be great if the interface could be customised so I can see at a glance which server/computer is behind the notebook GUI I'm looking at.
Is there a setting for adding a short piece of text to the title bar in the web interface? Can someone suggest a snippet of code to put in jupyter_notebook_config.py?
most flexible would be:
import socket
print(socket.gethostname())
answered in :
How can I use Python to get the system hostname?