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

Fixed showlegend for plotly #123

Conversation

nastya236
Copy link
Contributor

Fixed showlegend **kwargs in plotly scatter 3D.

from cebra.integrations.plotly import plot_embedding_interactive
import numpy as np

embedding = np.random.randn(100, 3)
labels = np.random.randint(0, 10, 100)

plot_embedding_interactive(embedding, labels, markersize=10, showlegend=True)

Screenshot 2024-01-04 at 13 11 08

plot_embedding_interactive(embedding, labels, markersize=10)

Screenshot 2024-01-04 at 13 11 25

Copy link
Member

@stes stes left a comment

Choose a reason for hiding this comment

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

Is it possible to write a test for this? Or at least add an example to how this is used? Does it affect the older plots in any way, @nastya236 ?

@nastya236
Copy link
Contributor Author

nastya236 commented Jan 4, 2024

Of course, writing test for this. I made some modifications in the last commit.
Update: tests are added and passed, ready for the review @stes

Copy link
Member

@MMathisLab MMathisLab left a comment

Choose a reason for hiding this comment

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

lgtm for discrete! I guess the idea is if the data is continuous the legend could be a bar with a color gradient?

Copy link
Member

@stes stes left a comment

Choose a reason for hiding this comment

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

thanks!

@stes stes merged commit 325b5bf into AdaptiveMotorControlLab:stes/fix-plotly-legend-121 Jan 4, 2024
1 check passed
@stes stes deleted the anastasiia/fix-plotly-legend-122 branch January 4, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants