IPython Notebook plot sizing
-
Hi,
I have a question on displaying chart sizes in ipython notebooks. Currently the chart is quite small even I open the image in a separate browser window. Is there any way to blow up the charts bigger/higher resolution?
Best,
-
The settings (size and/or resolution) are not set by backtrader.
Is there a known way to control those under ipython notebooks?
-
Yes,
I've tried the following with some success. It seems that I can control the plot size, but not plot font size. I've varied "font.size" from "20" all the way to "100" and they just don't seem to change.
import matplotlib.pylab as pylab pylab.rcParams['figure.figsize'] = 30, 20 # that's default image size for this interactive session pylab.rcParams['font.family'] = 'sans-serif' pylab.rcParams['font.sans-serif'] = ['Bitstream Vera Sans'] pylab.rcParams['font.serif'] = ['Bitstream Vera Sans'] pylab.rcParams["font.size"] = "100"
-
Setting the size of the figure is something you can do by controlling the plotting object.
See this other thread Community - Plot - maximize windows
You're obviously looking into increasing the default size set by ipython for the inline plot.
-
@cnimativ said in IPython Notebook plot sizing:
Yes,
I've tried the following with some success. It seems that I can control the plot size, but not plot font size. I've varied "font.size" from "20" all the way to "100" and they just don't seem to change.
import matplotlib.pylab as pylab pylab.rcParams['figure.figsize'] = 30, 20 # that's default image size for this interactive session pylab.rcParams['font.family'] = 'sans-serif' pylab.rcParams['font.sans-serif'] = ['Bitstream Vera Sans'] pylab.rcParams['font.serif'] = ['Bitstream Vera Sans'] pylab.rcParams["font.size"] = "100"
Seems to be fixed now. I could change the font size not on the plot but around the border. The font size of strings on the plot still doesn't change with this. (macOS)