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/

    backtrader-plotting control panel doesn't show up in Jupyter notebook

    General Code/Help
    3
    5
    591
    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.
    • D
      Dimasik007 last edited by

      Hi, I am using backtrader-plotting to make Bokeh plot in the Jupyter notebook. For some reason Bokeh control panel doesn't show up when I am making a plot inside the notebook. It works well when I am running a backtest from the terminal and the plot pops up in the browser.

      Does anyone know how this could be solved? Appreciate any help!

      bt-bokeh-plot.png

      1 Reply Last reply Reply Quote 0
      • D
        Dimasik007 last edited by

        Hi @vbs any chance you could suggest anything? Thanks!

        1 Reply Last reply Reply Quote 0
        • vbs
          vbs last edited by

          I am sorry, since I am not using notebooks I can not really help here. Interesting is that someone not using notebooks was having the same problem about the missing toolbar:
          https://community.backtrader.com/post/13521

          1 Reply Last reply Reply Quote 0
          • kian hong Tan
            kian hong Tan last edited by

            @Dimasik007 Another user and me have this issue too. See this post - https://community.backtrader.com/topic/813/bokeh-integration-interactive-webbrowser-plotting/53 . You can try changing the toolbar location ("left/above/below") as suggested by @Yang-Fu .

            b = Bokeh(style='bar', tabs='multi', scheme=Tradimo(), filename='test_bt_plot.html',
                toolbar_location='left')
            

            I'm using jupyter notebook too. If you want the plot to be shown in a new browser you can try

            cerebro.plot(b,iplot=False)
            
            1 Reply Last reply Reply Quote 0
            • D
              Dimasik007 last edited by

              @kian-hong-Tan thanks for your reply. Yes, I've tried all of that already and it doesn't work in Jupyter unfortunately so I guess I just won't use jupyter for now. I only noticed that some space is allocated for the toolbar but the toolbar itself doesn't want to show up.

              @vbs no problem, thanks for your reply and for backtrader-plotting!

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors