saezlab / MetaProViz

R-package to perform metabolomics pre-processing, differential metabolite analysis, metabolite clustering and custom visualisations.
https://saezlab.github.io/MetaProViz/
GNU General Public License v3.0
8 stars 0 forks source link

VizVolcano - PieChart legend #39

Closed ChristinaSchmidt1 closed 1 year ago

ChristinaSchmidt1 commented 1 year ago

If PieChartLegend is used together with shapes, the legend have not enough space. We can try and fix this by removing the legends from enhancedVolcano (legend=NULL), and adding them separately as done with the PieChart.

Moreover, the size of the PieChart changes dependent on the Volcano axis and data points. We should fix this, so the final graph is easily readable.

ChristinaSchmidt1 commented 1 year ago

Extract the legend. Returns a gtable

      leg <- ggpubr::get_legend(Plot)

      # Convert to a ggplot and print
      ggpubr::as_ggplot(leg)

   With this we could try to baiscally add both the legend from the plot and the pie chart
ChristinaSchmidt1 commented 1 year ago

For now I removed this feature to be plotted in the Volcano. Once I have updated all the saving functionalities I will work on implementing this properly.

ChristinaSchmidt1 commented 1 year ago

Moved to Viz package