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

enhance plot_shapes #104

Open
2 of 4 tasks
lopollar opened this issue Jun 23, 2023 · 2 comments
Open
2 of 4 tasks

enhance plot_shapes #104

lopollar opened this issue Jun 23, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@lopollar
Copy link
Contributor

lopollar commented Jun 23, 2023

plot_shapes works quite fast, but some extra functionality would be handy:

  • Add the option to plot without image
  • add the option to plot on previous figure (give ax as an input of the function)
  • add the option that if multiple columns are given multiple plots are made
  • add the option that if different crds are given, different plots are made
@ArneDefauw ArneDefauw self-assigned this Aug 14, 2023
@ArneDefauw
Copy link
Collaborator

ArneDefauw commented Aug 16, 2023

the napari_sparrow.pl.plot_shapes function now uses the napari_sparrow.pl._plot._plot_shapes function under the hood. The _plot_shapes function returns a matplotlib.pyplot.Axes object that can be used to easily make subplots.

napari_sparrow.pl.plot_shapes function keeps same functionality as before, but now it is possible to specify multiple image layers ,shapes_layers or channels as lists. Combination of image_layer and shapes_layers are plotted as columns of the figure, channels as rows.

In this way, both napari_sparrow.pl.plot_segment and napari_sparrow.pl.transcript_density can both use the same underlying napari_sparrow.pl.plot_shapes function, which simplifies the code.

Do we still implement the other extra features? With the availability of napari_sparrow.pl._plot._plot_shapes, the following two should be straightforward to implement:

-add the option that if multiple columns are given multiple plots are made
-add the option that if different crds are given, different plots are made

Do we want to generate one plot with subplots, or multiple plots?

@lopollar
Copy link
Contributor Author

I think one plot with subplots is the default and makes it easier to compare.
When people want them separately, they can always just ask to run it 5 times in a row.

@ArneDefauw ArneDefauw added the enhancement New feature or request label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants