Skip to content
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

More symbols for gl2d and gl3d plots #1550

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added test/image/baselines/marker_symbols.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions test/image/mocks/marker_symbols.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"data": [
{
"x": [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9],
"y": [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5],
"mode": "markers",
"text": [
"marker number: 0<br>marker string: 'circle'",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexcjohnson Turns out we didn't have a mock testing all our marker symbols.

I dug out https://github.com/plotly/streambed/pull/358 and plotly/documentation#16 and made this one here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch! Can you include just a few examples of 1xx (-open), 2xx (-dot) and 3xx (-open-dot) in this mock? It should be able to support just one more row 😉

And then we'll be able to see how this compares with the gl implementation, where I'm pretty sure colors are handled differently in the -open case than they currently are for svg, ie we would never have a double line like gl2d currently has.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 083b00a

"marker number: 1<br>marker string: 'square'",
"marker number: 2<br>marker string: 'diamond'",
"marker number: 3<br>marker string: 'cross'",
"marker number: 4<br>marker string: 'x'",
"marker number: 5<br>marker string: 'triangle-up'",
"marker number: 6<br>marker string: 'triangle-down'",
"marker number: 7<br>marker string: 'triangle-left'",
"marker number: 8<br>marker string: 'triangle-right'",
"marker number: 9<br>marker string: 'triangle-ne'",
"marker number: 10<br>marker string: 'triangle-se'",
"marker number: 11<br>marker string: 'triangle-sw'",
"marker number: 12<br>marker string: 'triangle-nw'",
"marker number: 13<br>marker string: 'pentagon'",
"marker number: 14<br>marker string: 'hexagon'",
"marker number: 15<br>marker string: 'hexagon2'",
"marker number: 16<br>marker string: 'octagon'",
"marker number: 17<br>marker string: 'star'",
"marker number: 18<br>marker string: 'hexagram'",
"marker number: 19<br>marker string: 'star-triangle-up'",
"marker number: 20<br>marker string: 'star-triangle-down'",
"marker number: 21<br>marker string: 'star-square'",
"marker number: 22<br>marker string: 'star-diamond'",
"marker number: 23<br>marker string: 'diamond-tall'",
"marker number: 24<br>marker string: 'diamond-wide'",
"marker number: 25<br>marker string: 'hourglass'",
"marker number: 26<br>marker string: 'bowtie'",
"marker number: 27<br>marker string: 'circle-cross'",
"marker number: 28<br>marker string: 'circle-x'",
"marker number: 29<br>marker string: 'square-cross'",
"marker number: 30<br>marker string: 'square-x'",
"marker number: 31<br>marker string: 'diamond-cross'",
"marker number: 32<br>marker string: 'diamond-x'",
"marker number: 33<br>marker string: 'cross-thin'",
"marker number: 34<br>marker string: 'x-thin'",
"marker number: 35<br>marker string: 'asterisk'",
"marker number: 36<br>marker string: 'hash'",
"marker number: 37<br>marker string: 'y-up'",
"marker number: 38<br>marker string: 'y-down'",
"marker number: 39<br>marker string: 'y-left'",
"marker number: 40<br>marker string: 'y-right'",
"marker number: 41<br>marker string: 'line-ew'",
"marker number: 42<br>marker string: 'line-ns'",
"marker number: 43<br>marker string: 'line-ne'",
"marker number: 44<br>marker string: 'line-nw'"
],
"marker": {
"color": "blue",
"size": 20,
"symbol": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44],
"line": {
"color": "orange",
"width": 1.5
}
},
"type": "scatter"
}
],
"layout": {
"width": 500,
"height": 500,
"xaxis": {
"showgrid": false,
"zeroline": false,
"showline": false,
"showticklabels": false
},
"yaxis": {
"showgrid": false,
"zeroline": false,
"showline": false,
"showticklabels": false
},
"annotations": [
{
"x": 0.5,
"y": 1,
"xref": "paper",
"yref": "paper",
"text": "Add 100 (or '-open') to marker number (or string) to remove the fill color,<br>Add 200 (or '-dot') to marker number (or string) to add a dot in the middle,<br>Add 300 (or '-open-dot', 'dot-open') to marker number (or string) for both.",
"font": {
"size": 10
},
"align": "left",
"showarrow": false,
"xanchor": "center",
"yanchor": "bottom"
}
],
"hovermode": "closest"
}
}