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

Box legend marker with invisible box but visible points #3836

Closed
nicolaskruchten opened this issue May 6, 2019 · 13 comments · Fixed by #3846
Closed

Box legend marker with invisible box but visible points #3836

nicolaskruchten opened this issue May 6, 2019 · 13 comments · Fixed by #3846
Assignees
Labels
bug something broken
Milestone

Comments

@nicolaskruchten
Copy link
Contributor

If I set the box fill and line to 0 opacity but have visible points, the legend entry is invisible. In this case it would be nice to have the legend entry look like the points.

@nicolaskruchten
Copy link
Contributor Author

For context, I'm trying to add strip plots to px:

image

@etpinard etpinard added the bug something broken label May 6, 2019
@etpinard
Copy link
Contributor

etpinard commented May 6, 2019

Should we add type: 'strip' traces to plotly.js?

@nicolaskruchten
Copy link
Contributor Author

could do, but it's really really easy to emulate with box (or even violin) for now so it's really not a priority, so long as we can slide in a fix for the legend :)

@etpinard etpinard added this to the v1.48.0 milestone May 6, 2019
@alexcjohnson
Copy link
Collaborator

Sure, get a quick legend fix in, but type: 'strip' would be nice at some point - feels awfully hacky to do it via box or violin (instructions: make a box with no box, or a violin with no violin. Take your pick!) and there may be some extra functionality that doesn't make sense in the existing types.

@etpinard
Copy link
Contributor

etpinard commented May 6, 2019

, but type: 'strip' would be nice at some point -

That or adding jitter to scatter traces (cc #299), Personally, I would prefer adding a type: 'strip' trace type.

@alexcjohnson
Copy link
Collaborator

Right, scatter.jitter is related, but not a replacement for type: 'strip' - especially grouping & offsets on the position axis, but also it's not clear to me if we can (or even if we want to) adjust scatter jitter for the local density of points like we do for box/violin jitter.

@nicolaskruchten
Copy link
Contributor Author

Glad you guys are into it! I'm not opposed to a strip type, but I'd still like a fix for the legend in the meantime :)

@etpinard
Copy link
Contributor

etpinard commented May 6, 2019

but I'd still like a fix for the legend in the meantime :)

Yep, that fix will be in 1.48.0

@nicolaskruchten
Copy link
Contributor Author

... adjust scatter jitter for the local density of points like we do for box/violin jitter.

I didn't realize we did that but looking at the screenshot above we clearly do, which is cool. It's sort of halfway to "swarm plots"

Seaborn has both but they're quite distinct: https://seaborn.pydata.org/generated/seaborn.swarmplot.html and https://seaborn.pydata.org/generated/seaborn.stripplot.html

@nicolaskruchten
Copy link
Contributor Author

Could we imagine an attr that would emulate swarm plots more directly?

@antoinerg
Copy link
Contributor

@nicolaskruchten maybe you can open a separate issue to discuss strip and/or swarm plots

@nicolaskruchten
Copy link
Contributor Author

What we have is already pretty cool as a hybrid... no rush on a new trace type just for this. Next trace type is... drumroll... indicator!

@etpinard
Copy link
Contributor

maybe you can open a separate issue to discuss strip and/or swarm plots

What we have is already pretty cool as a hybrid... no rush on a new trace type just for this.

I added it to #2221 in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants