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

labels is required and needs multiple values #12

Closed
dribnet opened this issue Feb 29, 2024 · 3 comments
Closed

labels is required and needs multiple values #12

dribnet opened this issue Feb 29, 2024 · 3 comments

Comments

@dribnet
Copy link

dribnet commented Feb 29, 2024

It seems that create_plot and create_interactive_plot both make the assumption that:

  1. The plot had labels at all
  2. The plot had at least two labels

I was a bit surprised that labels was a required argument since I didn't have clusters in my data and just wanted to see the data visually with the raw hover information. So as an initial workaround, I created a dummy list of labels where all data was "Unlabelled" or all data had the same label, but either caused a runtime crash.

In the end, I used these dummy labels

all_pipe = ["not_pipe", "Unlabelled"]
for n in range(len(lines)-2):
	all_pipe.append("pipe")
labels_all_pipe = np.array(all_pipe)

To work around this (and #11). But it seems like it could make sense to in the future allow unlabelled plots with simply labels=None

@lmcinnes
Copy link
Contributor

When I started this was really about putting labels on a plot in a sensible way, and only meant static plots. This was because it was actually surprisingly hard to do right at the time. So that's why labels are a required argument. You do make a good point though -- now that there is interactive plotting, and in the case you just want to take advantage of the automated point-size/use of datashader etc. there is reason to allow for no labels. Do you have any thoughts as to the colour that should be used? Should it all be the noise_color?

lmcinnes added a commit that referenced this issue Feb 29, 2024
@lmcinnes
Copy link
Contributor

Should be resolved now. Between this and #11 I have decided to push a minor patch release, so that should be hitting PyPI (and eventually conda-forge) in the next little while. Hopefully that solves these problems for you. Feedback is welcome.

@lmcinnes
Copy link
Contributor

lmcinnes commented Mar 5, 2024

Should be resolved now.

@lmcinnes lmcinnes closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants