Skip to content

grouped platt graph with different node labels #16

@waltno

Description

@waltno

I made a platt graph grouped by projection, but would also like to plot the cell_type labels. somehow this gets ignored in plot_annotations

if (plot_labels) {
        p <- p + ggrepel::geom_text_repel(data = g %>% select(x, 
            y, name) %>% distinct(), aes(x, y, label = name), 
            color = I("black"), box.padding = 0.5)
    }

tentative solution

lpm_state_graph = new_cell_state_graph(state_graph, ccs,hide_unlinked_nodes =T, group_nodes_by = "projection_subgroup", label_nodes_by = "cell_type", color_nodes_by = "cell_type")

p<-plot_annotations(lpm_state_graph, node_size = 2, label_nodes_by = "cell_type", plot_labels =TRUE)

p
g <- lpm_state_graph@g
p + ggrepel::geom_text_repel(data = g %>% select(x, 
            y, name) %>% distinct(), aes(x, y, label = name), 
            color = I("black"), box.padding = 0.5, size =2)
Image Image

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