metrica icon indicating copy to clipboard operation
metrica copied to clipboard

Customize the limits on x and y axis in metrica

Open Amit1979-UniBonn opened this issue 2 years ago • 1 comments

Currently, I am unable to customize the limits on the x and y-axis in the scatter plot function of library "metrica". Is it possible to include this feature? Thanks in advance, Best Regards, Amit

Amit1979-UniBonn avatar Sep 11 '22 09:09 Amit1979-UniBonn

Hi, Amit!

The underlying function uses coord_fixed() because it helps to automatically make the x and y axes symmetric, so you must change the limits with something like my_plot + ggplot2::coord_fixed(xlim = c(min_value, max_value), ylim = c(min_value,max_value)+

  • To simply change the scale use breaks inside scale_x/y_continuous()`, but this doesn't change the limits my_plot + ggplot2::scale_x/y_continuous(breaks=seq(min_value, max_value, by = steps_distance))

I'm including this feature soon for the next version!

Hope it helps!

Best,

ADRIAN

adriancorrendo avatar Sep 11 '22 16:09 adriancorrendo