Primary exercises
- Logarithmic scale and manual colors.
For the pulse
data construct the plot shown below.
Add scale_x_log10
and scale_y_log10
to change both location scales to logarithmic.
Enforce the same limits
from 50 to 150 on both scales.
ggplot( pulse ) +
aes( x = pulse1, y = pulse2, color = ran ) +
geom_point() +
scale_x_log10( limits = c( 50, 150 ) ) +
scale_y_log10( limits = c( 50, 150 ) ) +
xlab( "pulse1 (before exercise) [1/min]" ) +
ylab( "pulse2 (after exercise) [1/min]" ) +
scale_color_manual( values = c( ran = "black", sat = "orange" ) )
Copyright © 2022 Biomedical Data Sciences (BDS) | LUMC