-
Hi everyone! I'm using the oncoPrintPlotter and I'd like to be able to sort columns by myself. Looking at the previous discussion, I've seen you suggest using "col_split" and then "col_split_order" to specify the order I want. However when I do this I'm not able to remove the grid and spines of the top annotations as you describe in the documentation (it does work but only on the last column, all other column annotations keep their grid and spines): #remove the grid Is there a better way to order samples in an oncoprint or a way I could remove grid and spines if the only way to do it is by using col_split and col_split order? Also, columns can be easily sorted when using ClusterMapPlotter, but if I want my heatmap to display categorical data, the oncoprint should be used, right? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Thanks for your question @jfrigola . If you want to remove the grid and spine for all annotations, then you need to write a for annotation in op.top_annotation.annotations:
ax=annotation.ax
ax.grid(False)
#remove spines for top annotation and right annotation
despine(ax=ax,left=False, bottom=True, right=False, top=True)
despine(ax=ax,left=True, bottom=False, right=True, top=False) I hope this will solve your issue. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Thanks for your question @jfrigola . If you want to remove the grid and spine for all annotations, then you need to write a
for
loop.In the documentation, I only remove the grid and spine for the first annotation (Because I had only one annotation in the documentation,
op.top_annotation.annotations[0]
, 0 means the first annotation).You can remove the grid and spine for all annotation axes by writing a
for
loop:I…