-
Notifications
You must be signed in to change notification settings - Fork 6
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
Violin improvements #2875
Violin improvements #2875
Conversation
…on that size positioning the next plot.
Thanks looks nice. It seems like violin plots of some variables, for example heart radiation and alkylating agents, look shorter than violin plots of other variables, for example age and blood pressure. Do you see the same thing? The plot thickness should be the same, right? |
It is because of the smoothing applied on the client to the path being rendered, this is done after building the plot, it causes that the plot size is not the same for all the plots. The heart plots has some peaks that are more smoothed. I hope that this makes sense. I also added a padding parameter. We could make it smaller by default if you still feel is a lot of padding. But we have to check it looks ok for all the plots. By default is 5. |
I see. Padding is value is fine, so no need to change that. The heart radiation and alkylating agents plots do look a bit small by default, so it may be good to increase the default plot thickness. Im not too tied to it though, so if @xzhou82 is fine with them then I can approve. |
I updated the default size. I think is a good idea to increase it as that is the most common case and when there are many categories is ok to scroll. Please check. |
Great thanks. The increased plot thickness looks better. Seems like spacing between categories is now too small (example): Can spacing be increased? |
Yes I suppose can you update it? I am in another branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I increased plot padding to 10 and slightly decreased plot thickness to 130. If you think looks ok then we can merge
I guess we can wait, this is not a breaking change |
client/plots/singleCellPlot.js
Outdated
@@ -616,7 +616,7 @@ class singleCellPlot { | |||
plots: [ | |||
{ | |||
chartType: 'violin', | |||
settings: { violin: { plotThickness: 50 } }, | |||
settings: { violin: { plotThickness: 90 } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
90 too tall for seurat clusters which are usually many. i would like to revert to 50
also this really should be auto set based on number of categories
…kness is specified use it instead
I pushed a fix to calculate the plots size based on the number of plots unless a plotThickness is specified. Please check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much better. thanks
Description
This PR fixes #2839 by reordering the rendering logic: First render a plot, then get its size and based on that size position the next plot. It also does some cleanup in the code and adds a choice to configure the plot padding.
Checklist
Check each task that has been performed or verified to be not applicable.