Shians / NanoMethViz

Apache License 2.0
21 stars 2 forks source link

fix: moving the rug tassels of the plotting function to outside #23

Closed madhav-madhusoodanan closed 1 year ago

madhav-madhusoodanan commented 1 year ago

Problem: The rug tassels (within plot_methylation_internal function of plot_methylation.R) are inside the graph, which could hamper visibility when the statistics field exhibits zero or near-zero values

Solution: Bringing the rug tassels outside

madhav-madhusoodanan commented 1 year ago

Hi @Shians

Thank you soo much for this library, this has been an amazing tool when it comes to graphing genomic data.

This is one potential issue that came up on a small project of mine, for which I've created a PR. Do let me know your thoughts and how I can help in making this library better.

Yours sincerely, Madhav

Shians commented 1 year ago

Thanks for your feedback and contribution. The proposed fix puts the rugs over the the X-axis labels which I think is a bigger problem than potentially covering the data when it's close to 0. Also the code as-is does not work because it is missing coord_cartesian(clip = "off") which must be used when outside = TRUE.

My preferred fix for this problem is to move the rug plot geom before the lines such that any data is plotted over the rug. Alternative an outside rug could be place on the top instead of the bottom. For now I will put the rug behind the data lines for the next version.