bernatgel / karyoploteR

karyoploteR - An R/Bioconductor package to plot arbitrary data along the genome
https://bernatgel.github.io/karyoploter_tutorial/
297 stars 42 forks source link

plot.params margin - inconsistent settings #113

Closed jromanowska closed 2 years ago

jromanowska commented 2 years ago

I've noticed that there are inconsistencies in setting margins in 'plot.params'. While the top and bottom margins have large values, the left and right margins have values within range [0;1], which is confusing. Also other parameters like 'data1height' and similar have large values. What are the units of those? I'd suggest keeping one unit type for all the margins.

bernatgel commented 2 years ago

Hi @jromanowska

Yes, I know the values for some of the plot.params are not very intuitive and the two axis have very different approaches. This is due to the way the coordinate changing functions, the very core of the package, are made and they were programmed like this to make that code simpler and easier to maintain.

I think the getDefaultPlotParams and the plotDefaultPlotParams alleviate some of the burden on the users and I feel that at this point in time, with so much code written based on these plot.params it would not make sense to change them to be a bit more consistent.

Thanks in any case for your message and for wanting to improve karyoploteR!

Bernat