I would like to convert my jupyter notebook to a presentation using nbconvert. Is it possible to position a matplotlib figure at the center of a slide?
In jupyter, I prevent my code from displaying, and then make a plot.
(RawNBConvert)
<style type="text/css">
.input_prompt, .input_area, .output_prompt {
display:none !important;
}
</style>
(python)
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot([1,2,3]);
Then, this notebook is converted to an html using the following command:
jupyter nbconvert mynote.ipynb --to slides
The resulting html renders like this.
I have been trying to center this plot in my slide. I looked at my reveal.css file, but could not figure out which part to change. Does anyone know how I can fix this?
I use jupyter 1.0.0 and nbconvert 4.2.0.
There might be better solutions, but adding a few lines in the RawNBConvert cell fixed this problem. I hope this causes no side effect.