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/

    cerebro.plot() not work with VScode

    General Code/Help
    2
    4
    1058
    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.
    • 董科
      董科 last edited by

      (Uploading 100%) (image url))

      ReferenceError: IPython is not defined
      at eval (eval at runCodeHere (vscode-resource://file///c%3A/Users/baihe/.vscode/extensions/ms-python.python-2020.4.74986/out/datascience-ui/notebook/vendors~nteract_transforms.bundle.js:2:11583), <anonymous>:764:1)
      at runCodeHere (vscode-resource://file///c%3A/Users/baihe/.vscode/extensions/ms-python.python-2020.4.74986/out/datascience-ui/notebook/vendors~nteract_transforms.bundle.js:2:11583)
      at t.value (vscode-resource://file///c%3A/Users/baihe/.vscode/extensions/ms-python.python-2020.4.74986/out/datascience-ui/notebook/vendors~nteract_transforms.bundle.js:2:12015)
      at Io (vscode-resource://file///c%3A/Users/baihe/.vscode/extensions/ms-python.python-2020.4.74986/out/datascience-ui/notebook/commons.initial.bundle.js:2:2192129)
      at Fo (vscode-resource://file///c%3A/Users/baihe/.vscode/extensions/ms-python.python-2020.4.74986/out/datascience-ui/notebook/commons.initial.bundle.js:2:2195051)
      at vscode-resource://file///c%3A/Users/baihe/.vscode/extensions/ms-python.python-2020.4.74986/out/datascience-ui/notebook/commons.initial.bundle.js:2:2208131
      at Object.t.unstable_runWithPriority (vscode-resource://file///c%3A/Users/baihe/.vscode/extensions/ms-python.python-2020.4.74986/out/datascience-ui/notebook/commons.initial.bundle.js:2:25151)
      at Ms (vscode-resource://file///c%3A/Users/baihe/.vscode/extensions/ms-python.python-2020.4.74986/out/datascience-ui/notebook/commons.initial.bundle.js:2:2208065)
      at Es (vscode-resource://file///c%3A/Users/baihe/.vscode/extensions/ms-python.python-2020.4.74986/out/datascience-ui/notebook/commons.initial.bundle.js:2:2207841)
      at ws (vscode-resource://file///c%3A/Users/baihe/.vscode/extensions/ms-python.python-2020.4.74986/out/datascience-ui/notebook/commons.initial.bundle.js:2:2207186)

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

        TIM截图20200427160052.png

        1 Reply Last reply Reply Quote 0
        • Baker Chen
          Baker Chen last edited by

          do u solve this problem or not? I come across the same problem. When I use the backtrader in vscode, cerebro.plot() seems not work

          1 Reply Last reply Reply Quote 0
          • Baker Chen
            Baker Chen last edited by

            After some search, it seems the problem with ipython kernel. So just use another plot frame is ok to show the figure.

            matplotlib.use('Qt5Agg')
            plt.switch_backend('Qt5Agg')
            
            cerebro.plot(height = 30, iplot = False)
            plt.show()
            
            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors