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/

    IPython Notebook plot sizing

    General Code/Help
    3
    5
    6711
    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.
    • C
      cnimativ last edited by

      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,

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

        The settings (size and/or resolution) are not set by backtrader.

        Is there a known way to control those under ipython notebooks?

        1 Reply Last reply Reply Quote 0
        • C
          cnimativ last edited by

          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"
          

          0_1490887198390_3.png

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

            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.

            1 Reply Last reply Reply Quote 0
            • K
              kojinakata @cnimativ last edited by

              @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"
              

              0_1490887198390_3.png

              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)

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
              $(document).ready(function () { app.coldLoad(); }); }