Skip to content

Plotly plotting#1694

Open
bennthomsen wants to merge 6 commits into
QCoDeS:mainfrom
bennthomsen:plotly_plotting
Open

Plotly plotting#1694
bennthomsen wants to merge 6 commits into
QCoDeS:mainfrom
bennthomsen:plotly_plotting

Conversation

@bennthomsen
Copy link
Copy Markdown

Add Plotly Plotting Backend and Examples

Description
This PR adds an interactive plotly plotting backend as an alternative to matplotlib, along with a comprehensive Jupyter notebook demonstrating both plotting options.

Changes

New Features
Added: Plotly plotting backend for interactive visualization of pulse sequences
Added: Plotting_Examples.ipynb - Comprehensive notebook showcasing both plotting backends
Modified Files
Modified: broadbean/plotting.py - Added plotly_backend module with support for:

Plot individual blueprints
Plot multi-channel elements
Plot multi-position sequences
Full marker visualization support

Modified: broadbean/plotter.py - Updated plotter() function to accept backend parameter:

backend="matplotlib" (default) - Static plots
backend="plotly" - Interactive plots with zoom/pan

Testing:
Added: tests\test_plotting.py

Usage
`from broadbean import plotter

Matplotlib (default)

plotter(sequence)

Plotly (interactive)

plotter(sequence, backend="plotly")`
Testing

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 2.14286% with 137 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.16%. Comparing base (b862287) to head (3ba61fd).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
src/broadbean/plotting.py 2.14% 137 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1694      +/-   ##
==========================================
- Coverage   72.12%   68.16%   -3.97%     
==========================================
  Files           9        9              
  Lines        1539     1649     +110     
==========================================
+ Hits         1110     1124      +14     
- Misses        429      525      +96     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@astafan8 astafan8 left a comment

Choose a reason for hiding this comment

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

Great! Thank you, also for tests and documentation!

Comment thread src/broadbean/plotting.py
if seq_info["jump_input"] != 0:
if seq_info["jump_input"] == -1:
titlestring += "E\u2192 "
titlestring += " "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jenshnielsen what do you think about this change of \u** to actual unicode characters? i'm reluctant however don't have conrete technical reasons why

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.

3 participants