Uh oh!
There was an error while loading. Please reload this page.
Add a basic smith chart - #5615
Conversation
archmoj
commented
May 19, 2021
@waxlamp Thanks for the PR. then pull & merge |
waxlamp
commented
May 19, 2021
I marked this PR as "draft" specifically because it's really not ready for review yet. I can still run the syntax fixing and master merge steps if you like, but my plan was to continue working in this "dirty" mode, then at the end clean up the commits and perhaps file them via a new PR branch (closing this one) on which I'd pay much closer attention to the software standards for a ready-to-merge pull request. Let me know how you'd like me to proceed. |
jackparmer
commented
May 21, 2021
Sounds fine @waxlamp . It might still be nice to see a list of TODOs to break down and understand what's left. Looking forward to discussing tomorrow! |
waxlamp
commented
May 21, 2021
Completely forgot to address the TODO suggestion from @archmoj, sorry! Yes I will add some TODOs 😸 |
archmoj
commented
Jun 25, 2021
@waxlamp FYI the old image test system is replaced with a new one which would be needed in this PR i.e. to generate new baselines. |
This is just a copy of scatterpolar with a changed name.
This commit also adds a `smith` plot type, which is a copy of polar, with minimal changes needed to host the `scattersmith` trace type.
Also cleaned up code a little bit.
waxlamp
commented
Jun 28, 2021
Thanks for the guidance--I just did this, so we should be able to discuss later today. Looking forward to it! |
archmoj
commented
Jul 7, 2021
@waxlamp would you please fetch upstream master and merge (or rebase). |
archmoj
commented
Aug 17, 2021
Please add one of the |
| var real = layoutOut.smith.realaxis; | ||
| expect(imag.type).toBe('linear'); | ||
| expect(real.type).toBe('linear'); |
There was a problem hiding this comment.
The type should be expected to be undefined for these axes not linear.
There was a problem hiding this comment.
As far as I know, the axis types really are linear. It may be an implementation detail, in which case I can simply remove these assertions from the test.
| expect(imag.type).toBe('linear'); | ||
| expect(real.type).toBe('linear'); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Let's copy & adapt these test from polar_test:
it('should propagate axis *color* settings',function(){it('should coerce hoverformat even for `visible: false` axes',function(){it('should be able to reorder axis layers when relayout\'ing *layer*',function(done){it('should be able to toggle axis features',function(done){it('should clean up its framework, clip paths and info layers when getting deleted',function(done){it('should trigger hover/unhover/click/doubleclick events',function(done){Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| gridwidth: axesAttrs.gridwidth | ||
| }, 'plot', 'from-root'); | ||
| var axisTickAttrs = overrideAll({ |
There was a problem hiding this comment.
Some of these may not be supported.
Let's test all the working features in the image test.
| connectgaps: scatterAttrs.connectgaps, | ||
| marker: scatterAttrs.marker, | ||
| cliponaxis: extendFlat({}, scatterAttrs.cliponaxis, {dflt: false}), |
There was a problem hiding this comment.
Please test cliponaxis: true in the image test.
There was a problem hiding this comment.
For smith charts, there's not much meaning in plotting values outside the main plot area--that is, cliponaxis should always be true and this shouldn't be an attribute in the trace. Can I remove it?
There was a problem hiding this comment.
cliponaxis is more subtle than that - it's about what happens when a marker gets close to the subplot boundary: do we draw it partially, literally clipping the drawn shape to the subplot area, or do we continue drawing the complete shape until the data point itself exits the subplot area? See https://rreusser.github.io/plotly-mock-viewer/#cliponaxis_false
| smoothing: lineAttrs.smoothing, | ||
| editType: 'calc' | ||
| }, | ||
| connectgaps: scatterAttrs.connectgaps, |
Uh oh!
There was an error while loading. Please reload this page.
| textposition: scatterAttrs.textposition, | ||
| textfont: scatterAttrs.textfont, | ||
| fill: extendFlat({}, scatterAttrs.fill, { |
There was a problem hiding this comment.
No, but my understanding is that fill doesn't really make sense in a smith chart. Should I keep it and write a test, or remove the attribute?
There was a problem hiding this comment.
Nonetheless, it does seem to work, and I added a test: 383b6f1
Uh oh!
There was an error while loading. Please reload this page.
| text: scatterAttrs.text, | ||
| texttemplate: texttemplateAttrs({editType: 'plot'}, { | ||
| keys: ['re', 'im', 'text'] |
There was a problem hiding this comment.
Please add tests for these texttemplate options.
Co-authored-by: Mojtaba Samimi <33888540+archmoj@users.noreply.github.com>
Co-authored-by: Mojtaba Samimi <33888540+archmoj@users.noreply.github.com>
waxlamp
commented
Aug 18, 2021
|
archmoj
commented
Sep 27, 2021
Thanks for the contribution on this PR. |
This draft PR shows a WIP approach to adding a Smith chart to Plotly. This consists of a new
scattersmithtrace and a newsmithchart type that work together.scattersmithandsmithare copies ofscatterpolarandpolarthat I have slowly mutated in place to implement Smith chart semantics.TODOs:
scattersmithconfigradialaxisandangularaxistorealaxisandimaginaryaxisrespectively