Skip to content

sdata.pl.render_points() works weird #320

Closed

Description

@wangjiawen2013

Hi,
I find sdata.pl.render_points() works wiered when using the default datashader method. Maybe there there something wrong when processing the coordinates for datashader.
The output of sdata.pl.render_points("transcripts", color="feature_name", groups="A2M", size=100, palette="orange").pl.show():
image

The output of sdata.pl.render_shapes("cell_boundaries", color="A2M").pl.render_points("transcripts", color="feature_name", groups="A2M", size=100, palette="orange").pl.show() is similiar, the coordinate of transcripts is global:
image

The output of sdata.pl.render_shapes("cell_boundaries", color="A2M").pl.render_points("transcripts", color="feature_name", groups="A2M", method="matplotlib", palette="orange").pl.show() worked well:
image

Here is my spatialdata object:
image

Activity

  1. LucaMarconato commented on Aug 13, 2024

    @LucaMarconato
    Member

    Thanks for the details. You are correct, there is problem with datashader which I reported here #291 and is currently being worked on. In the issue I posted a workaround (transform the points data before plotting).

    Regarding the axis name, we do not plan to automatically write spatial; but if you are interested it you can for instance do

    import matplotlib.pyplot as plt
    
    plt.figure()
    ax = plt.gca()
    sdata.pl.render_shapes(...).pl.show(ax=ax)
    ax.set_xlabel('X-axis label')
    ax.set_ylabel('Y-axis label')
    plt.show()

    Closing the issue as duplicate of #291.

  2. LucaMarconato commented on Aug 13, 2024

    @LucaMarconato
    Member
  3. changed the title [-]sdata.pl.render_points() works wiered[/-] [+]sdata.pl.render_points() works weird[/+] on Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions