microsoft / microsoft/Qcodes

array parameter 2d plot axis choice

Open
#266 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
459
Forks
359
Avg merge
3d 6h
Merged PRs (30d)
73

Description

### Steps to reproduce
1. Take data for a 2d plot with an array type parameter (aka 'multidimensional' or 'hard', for me this is the trace data from a VNA - see [#243](https://github.com/qdev-dk/Qcodes/issues/243))
eg sweep time and take trace every second
2. plot it using MatPlot or QtPlot specifying x y and z variables
ie
`qc.MatPlot(data.VNA_time, data.VNA_frequency, data.VNA_magnitude)`
instead of just
`qc.MatPlot(data.VNA_magnitude)`
### Expected behaviour

Would expect the plot to have x axis time, y axis frequency and colour plot magnitude
### Actual behaviour

In MatPlot it gives an error:
![capture-1](https://cloud.githubusercontent.com/assets/4841569/16985641/283dd7fa-4e82-11e6-9493-1958d129ff1f.PNG)

In QtPlot It writes the correct names on the axes but doesnt transpose the plot and makes up values for the axes to correspond to the shape
ie `qc.MatPlot(data.VNA_magnitude)` gives
![capture3w](https://cloud.githubusercontent.com/assets/4841569/16985681/66ddb37c-4e82-11e6-895f-f5cec895fe01.PNG)

and `qc.MatPlot(data.VNA_time, data.VNA_frequency, data.VNA_magnitude)` gives
![captureqt](https://cloud.githubusercontent.com/assets/4841569/16985688/79897542-4e82-11e6-994f-00f5d8993d97.PNG)

Same system works fine for 1d plot axis switching in tutorial notebook
### System

T5 (windows)
driver/rohde_schwarz_ZNB20

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the multidimensional trace case with MatPlot and QtPlot, comparing qc.MatPlot(data.VNA_magnitude) with the explicit x, y, and z call described here. Trace how MatPlot and QtPlot choose axes and orient 2D array data; done means the explicit call uses time and frequency as axes and magnitude as the color values without errors or fabricated axes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.