Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Resizing plot() inside Jupyter notebook

    General Code/Help
    3
    3
    3412
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sfkiwi last edited by

      I'm running cerebro inside a jupyter notebook. When I try to plot the resulting plot is completely squashed as you can see below. I am passing in iplot=False and also have %matplotlib at the top of my notebook. I've also tried %matplotlib inline which makes it worse.

      0_1530322222478_screenshotplot.png

      1 Reply Last reply Reply Quote 1
      • B
        backtrader administrators last edited by

        https://stackoverflow.com/questions/36367986/how-to-make-inline-plots-in-jupyter-notebook-larger

        1 Reply Last reply Reply Quote 1
        • 董科
          董科 last edited by

          plt.rcParams['font.sans-serif']=['SimHei']
          plt.rcParams['axes.unicode_minus']=False
          plt.rcParams['figure.figsize']=[18, 16]
          plt.rcParams['figure.dpi']=200
          plt.rcParams['figure.facecolor']='w'
          plt.rcParams['figure.edgecolor']='k'
          cerebro.plot(iplot=False)
          
          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors