Skip to content

Feature/control parameters plotted in plot dataset #6931

Merged
jenshnielsen merged 16 commits intomicrosoft:mainfrom
harrietoxinst:feature/control-parameters-plotted-in-plot_dataset
Apr 3, 2025
Merged

Feature/control parameters plotted in plot dataset #6931
jenshnielsen merged 16 commits intomicrosoft:mainfrom
harrietoxinst:feature/control-parameters-plotted-in-plot_dataset

Conversation

@harrietoxinst
Copy link
Contributor

This PR introduces a parameters argument to the plot_dataset function such that not all dependent parameters have to be plotted if this behaviour is not desired. This closes #6898 . Motivation for this change is further outlined there.

Default behaviour of plot_dataset remains unchanged. I have also added the parameters argument to the plot_by_id function preserving the equivalent behaviour shared by plot_by_id and plot_dataset.

To provide an example of when/how this might be used I have added the following under 1.2 Two interleaved 1D sweeps in the Offline Plotting Tutorial notebook:

image

@harrietoxinst harrietoxinst requested a review from a team as a code owner March 3, 2025 13:30
@harrietoxinst
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Oxford Instruments"

@codecov
Copy link

codecov bot commented Mar 5, 2025

Codecov Report

Attention: Patch coverage is 68.18182% with 7 lines in your changes missing coverage. Please review.

Project coverage is 59.92%. Comparing base (afdaae3) to head (ddb2d00).
Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
src/qcodes/dataset/plotting.py 68.18% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6931   +/-   ##
=======================================
  Coverage   59.91%   59.92%           
=======================================
  Files         342      342           
  Lines       31448    31468   +20     
=======================================
+ Hits        18842    18856   +14     
- Misses      12606    12612    +6     

☔ 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.

@harrietoxinst
Copy link
Contributor Author

Thanks for reviewing. I have committed the suggested change and fixed the errors for pre-commit check.

@harrietoxinst
Copy link
Contributor Author

I have looked at the pytest fail which seems unrelated to the changes I've made, consistent with previous iterations of this PR passing that test. Is this an intermittently failing test perhaps? I have tried to re-run this test locally and it passes. Would someone be able to re-run this test please?

@jenshnielsen
Copy link
Collaborator

@harrietoxinst The failure is indeed unrelated. Would you have the time to write a few tests for this code. tests would probably go to tests/dataset/test_plotting.py I would expect you to be able to write tests by copying and modifying some of the existing tests

@jenshnielsen jenshnielsen enabled auto-merge April 3, 2025 11:20
@jenshnielsen jenshnielsen added this pull request to the merge queue Apr 3, 2025
Merged via the queue into microsoft:main with commit b3be6b6 Apr 3, 2025
18 checks passed
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.

[feature request] option to control which parameters are plotted in plot_dataset

2 participants