-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[WIP] Carpet plots #1239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
[WIP] Carpet plots #1239
Changes from all commits
Commits
Show all changes
143 commits
Select commit
Hold shift + click to select a range
5ad7bb9
Carpet scaffolding
rreusser 7e6858a
Start building cheater supplydfeaults
rreusser 752d268
First signs of life with carpet
rreusser 5c302aa
First cut at base carpet axis trace type
rreusser 256ff18
Work out a lot of details of spline evaluation
rreusser 1c064fc
Work out carpet interpolation
rreusser 3199d70
Tweak grid defaults
rreusser 2016ae2
Tweak gridline code
rreusser ce290ae
Fix tons of interpolation bugs
rreusser 4e4c093
Fix carpet label details
rreusser 5aa52ce
Very rough carpet scatter trace
rreusser 2883068
Add cheater mock
rreusser c29fdf7
Add quick hover labels
rreusser e384d80
Continue on carpets
rreusser b394ca1
Merge branch 'master' into carpet-plots
rreusser 6c8154c
Merge branch 'master' into carpet-plots
rreusser e731152
Supply default reorganization for carpet plots
rreusser bf203a0
Merge branch 'master' into carpet-plots
rreusser fb002c8
Major refactor of carpet axes
rreusser 714db5a
Large lint-fixing pass
rreusser 2e5fbe6
Fix bad attribute defaults
rreusser 502f89a
Choose better defaults
rreusser 98a660f
Remove unused require
rreusser 656a8db
CLean up the carpet plot function
rreusser 56f9662
Carpet clip path
rreusser 7fd160d
Fix header info
rreusser 6651fdf
Correct bad internal API decisions for spline bounds
rreusser ef82074
Start fixing setconvert
rreusser dbf269f
scattercarpet extrapolation and visibility culling
rreusser 17a6b52
Add calc prioritization
rreusser dc2d76e
Prioritize module.calc + module.transform and make ordering stable
rreusser 136f43c
Basic contourcarpet
rreusser 36e2100
Make a big input transpose fix
rreusser 3c1ca75
Style contourcarpet plots
rreusser 82e86f3
Carpet contour adjustments
rreusser c80a5e9
Merge branch 'master' into carpet-plots
rreusser 9ccdcfe
Add missing `visible` attribute to gl3d
rreusser 71efcf9
Fix contourcarpet bg path rendering
rreusser 946c751
A giant transpose of most of carpet plots
rreusser ec7ab18
Extract axsi-aligned carpet lines
rreusser eed5406
Fix the carpet axis derivatives
rreusser 7304043
Restore badly merged cheater axis hiding logic
rreusser e4dc03c
Sorta account for missing a/b on contourcarpet
rreusser 490039c
Add a detailed note about mutating user input
rreusser 8f8ea25
Contourcarpet inequalities
rreusser 65eaf4c
Merge branch 'master' into carpet-plots
rreusser acff100
Fix convertColumnData to default to original behavior
rreusser 4088ee8
Fix bad plot schema attrs
rreusser 223d120
Comment out bad tests
rreusser 5a11a85
Fix incosistent linter result?
rreusser 263d5dc
Fix header dates
rreusser 646255f
Tweak cheater hiding logic
rreusser ae0e3c8
Add mising visibility attr to ternary axis duck-typing
rreusser 01b0803
Get rid of constraints subattr
rreusser b708e32
Split everything into lots more files
rreusser 9d99328
A/B axis titles
rreusser e09b97a
Add cheater baseline
rreusser b17e7e5
Fix incorrect argument ordering in contourcarpet bg
rreusser 05cd928
Add cheater mock without smoothing
rreusser dfb9f3e
Dump editable carpet title + default
rreusser ac0945a
Add carpet constraint mock
rreusser d54ae59
Fix clip path
rreusser a2b89b0
Add carpet axis baseline
rreusser e9865c0
Merge branch 'master' into carpet-plots
rreusser 8a9cbea
Carpet legend
rreusser f65a109
Update mocks and baselines and carpet defaults
rreusser 52c0e04
Update cheater contour mock
rreusser 4da8426
Merge branch 'master' into carpet-plots
rreusser 34c41cc
Revert unnneded legend style change
rreusser d15a450
Partial carpet axis fix
rreusser af0bcea
Break most of carpet plots
rreusser 7eefde2
Add all the files
rreusser cabeb06
Disable legend isolate for carpet axes
rreusser 564cf8d
Don't coerce cheaterslope if not cheater
rreusser df3b354
Add scattercarpet mock
rreusser 309d360
Fix lint errors
rreusser 5e5a2ab
Properly pass fullLayout to the new axis
rreusser e43d716
:hocho: ugly _gd reference
etpinard 310d61e
call carpet setConvert in defaults
etpinard 966e31e
call conversion mehtod on full trace object instead of calcdata item
etpinard cca3562
Merge branch 'carpet-plots-etienne' into carpet-plots
rreusser aa6c8a7
Add scattercarpet mock
rreusser 2f4b38b
Carpet baselines
rreusser a7521ae
Expand carpet_axis mock
rreusser 047a93d
Tweak baseline to make it meaningful
rreusser 3ccce1a
Skew x coords more
rreusser 8a34a20
Rename baselines
rreusser 41e35b4
Tweak scattercarpet baseline
rreusser 1f79e08
Tweak carpet fill mock
rreusser 6846186
setConvert *after* data is categorized
rreusser dcfcd98
Make unsmooth cheater more unsmooth
rreusser 3f3b879
add a carpet recalc / replot attributes
etpinard cdba832
Remove broken test
rreusser d729673
Fix multiple fill baseline
rreusser 06948e3
Extensive mocks for carpet boundaries
rreusser b466a02
Mocks srsly
rreusser 291b5de
Mock cleanup
rreusser f053aa0
Test carpet plots
rreusser 86345de
Fill 1D array + tests
rreusser 58261ef
Add carpetlayer that receives carpetaxis
rreusser fd32c25
Lots of carpet contour fixes
rreusser 992d97a
Airfoil baseline
rreusser 1046dd3
Merge branch 'master' into carpet-plots
rreusser f98ae64
Airfoil!
rreusser ea7a71f
Update cheater baseline
rreusser 977021a
Delete fancy contourcarpet code now handled elsewhere
rreusser 4af500a
Fix carpet legend line styling
rreusser ca49a5a
Axis toolpanel fixes
rreusser 9b4f2b4
Fix carpet visibility changes
rreusser 7ac5f42
Add missing trace class to carpet traces
rreusser e577ad1
Merge branch 'master' into carpet-plots
rreusser 7e5e5ef
Fix and test cheater axis visibility test
rreusser 688516a
Fix carpet/legendonly interaction and isolate mode
rreusser cd246e9
Move legendonly restriction to supplyTraceDefaults
rreusser 19a960b
Normalize cheater range for better consistency
rreusser 30b0280
Fix contourcarpet showlegend
rreusser 0136aa3
Fix carpet mocks
rreusser 3f18627
Fix carpet indexing bug
rreusser 1f69fef
Start fixing contour setup
rreusser ec6e519
Fix colorbar override
rreusser d693fe5
Fix contourcarpet colorscale setup
rreusser e202957
Re-run cheater baselines
rreusser 30c9063
Fix contourcarpet line color defaults
rreusser 7d4b482
Change carpetid to carpet
rreusser 800971f
Minor cleanup for PR review
rreusser d94009e
Add missing file :|
rreusser 11fafef
Fix messy carpet mock
rreusser bcde707
Fix carpet mocks
rreusser 172ea34
Update scattercarpet baseline
rreusser 6c627d4
Clean up mock/baseline listing
rreusser 1eafd94
Fix scattercarpet on empty axis
rreusser 8f17dd6
Remove redundant keys in cheater mock
rreusser 3764da3
Minor cleanup and remove calcPriority
rreusser 8307c9e
Move ensure_array to lib
rreusser e3b6d2a
Minor cleanup from PR review
rreusser 906220d
Add carpet meta
rreusser aedb473
Remove carpet from main plotly bundle
rreusser 8c7d00c
Recycle code
rreusser b4d0848
Restore carpet to main bundle
rreusser c88fae1
Remove unused
rreusser 3f90a0b
Merge branch 'master' into carpet-plots
rreusser c2af4c0
Remove newlines
rreusser 69b4d8b
Remove circular dependency
rreusser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Copyright 2012-2017, Plotly, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = require('../src/traces/carpet'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Copyright 2012-2017, Plotly, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = require('../src/traces/contourcarpet'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Copyright 2012-2017, Plotly, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = require('../src/traces/scattercarpet'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright 2012-2017, Plotly, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/* | ||
* Ensures an array has the right amount of storage space. If it doesn't | ||
* exist, it creates an array. If it does exist, it returns it if too | ||
* short or truncates it in-place. | ||
* | ||
* The goal is to just reuse memory to avoid a bit of excessive garbage | ||
* collection. | ||
*/ | ||
module.exports = function ensureArray(out, n) { | ||
if(!Array.isArray(out)) out = []; | ||
|
||
// If too long, truncate. (If too short, it will grow | ||
// automatically so we don't care about that case) | ||
out.length = n; | ||
|
||
return out; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe carpet traces should be part of the
cartesian
bundle?If
scatterternary
wasn't already in there I'd vote for no. But now that I realisescatteternary
is part of the cartesian bundle, I'm not so sure.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. I'm not sure exactly what's best for a default. Easiest for working was just to bundle it. But it's quite a bit of code, generally speaking, so that I feel like it will require some more nuanced per-bundle decisions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Let's leave carpet traces out of the cartesian bundle to start. We can always add then down the road in a future minor release if we choose to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a bundle which should include it by default?