Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Introduce flexible height by proportially sizing elements#1302

Open
polyclick wants to merge 1 commit intokernc:masterkernc/backtesting.py:masterfrom
polyclick:flexible-heightpolyclick/backtesting.py:flexible-heightCopy head branch name to clipboard
Open

Introduce flexible height by proportially sizing elements#1302
polyclick wants to merge 1 commit intokernc:masterkernc/backtesting.py:masterfrom
polyclick:flexible-heightpolyclick/backtesting.py:flexible-heightCopy head branch name to clipboard

Conversation

@polyclick
Copy link
Copy Markdown

Let's user set a hardcoded value for the main OHLC chart, will proportially resize other sections.

  • Defaults to 400px
  • Tested & works in Jupyter Notebooks
  • Not tested in a browser
bt.plot(
  plot_height=800
)
SCR-20250812-iiwj-2 SCR-20250812-iiwj-3

Comment thread backtesting/_plotting.py
drawdown_height = int(base_height * 0.2) # was 80px
pl_height = int(base_height * 0.2) # was 80px
volume_height = int(base_height * 0.175) # was 70px
indicator_height = int(base_height * 0.125) # was 50px
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that these are fixed proportions, and that's that.

Maybe we could make param plot_height: int | Tuple[int] | Dict[str, int]? 馃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.