I'm using jupyter notebook version 5.2.2 with python
When I display a DataFrame in the notebook the table style looks really nice. Especially the alternating grey and white row colors. When I save the notebook as html the nice style disappears.
Is there any way to keep the style that appears in the notebook itself?
Unfortunately, there is no way to achieve this. I have run into this problem before. When you convert the notebook to HTML you lose that styling.
Related
I am trying to convert a Jupyter Notebook, containing markdown and code cells to pdf via jupyter nbconvert --to pdf notebook.ipynb.
This works well as expected, however I have troubles to display images which are set into markdown tables like:
Figure1 | Figure 2
:-------------------------:|:-------------------------:
![](first.jpg) | ![](second.jpg)
for more than two images, the pdf is perfectly rendered and the images are displayed next to each other without any problems.
However, for exactly two images, the images are much too big and the second image gets cut off (all images have same size).
Is there any quick-fix to solve this issue? The notebook has a lot of images, so I want to avoid changing every markdown table.
I'm running the Jupyter notebook from local Ubunto machine in Windows 10.
The problem is that all the text is aligned to the right side of the screen, including the menu - the "Files" tab for example is on the most right side.
It is very hard to read the text this way.
Is there a way to "convince" the Jupyter notebook to lunch as left to right language?
I tried to define the locale parameters and now everything is en_US.UTF-8.
I also tried to run the jupyter notebook from Edge and Chrome but both lunch with text aligned to the right.
I don't see this problem at other sites, but I don't think it is Jupyter specific issue.
image of my Jupyter Notebook
It turned out that it was the Google Chrome setting after all.
I needed to change the language setting so that the English will be on the top preference.
Jupiter decide it base on browser language as mentioned here. Inside a specific notebook you can press Ctl+Shift+f and select toggle rtl
I like that output cell scrolling allows me to contain a lot of information in a small space. But if I convert my notebook to HTML, the doc doesn't have the scrolling. Is there a way to preserve this formatting in the converted doc?
Before:
After:
This happens with both nbconvert and Download As HTML.
Also, if there was a way to preserve the original shading and other formatting details, I would appreciate hearing that as well.
When I try to plot some data in Google Colaboratory, it automatically adds some light blueish color and white grids. I want to have a black frame and white background only. Is it possible to do that?
Thanks
I just started using Google Colab this week and also find the plots in colab got a certain style. To make it back to the same default style as jupyter notebook just add this line after you import matplotlib:
plt.style.use('default')
To remove grid, try this:
plt.grid(None)
Typical matplotlib styling options apply in Colab as you'd expect. Here's an example:
https://colab.research.google.com/notebook#fileId=1Gd5qmaw-eqoa2jV0HxEjOssE0PYVpEtH
The key bits are:
plt.rcParams['axes.facecolor'] = 'white'
plt.grid(c='grey')
I'm using MacVim and Vim-R to interactively edit and run R code. Everything seems to be working fine, but I can't seem to figure out how to set the background color in the tmux window that R runs in.
To be precise: I open up a .r file with MacVim. Then I type _rf, which causes XQuartz to start up, and a window with the title 'tmux' to open up with R running inside of it. When I highlight lines of code and send them to R from MacVim, everything seems to work fine. But the default background color of the tmux window is white, which makes the nicely colored output text hard to read.
How can I change the background color of the tmux window to something darker?
See this part of the doc to force your plugin to use the right terminal emulator.
If you don't want to do that (I think that you should), you can configure the appearance of xterm in the ~/.Xresources file. This guide gives you useful examples.