Last active
May 4, 2021 22:28
-
-
Save avallecam/46f6bcb2d0e5a622ef135589d0088e10 to your computer and use it in GitHub Desktop.
set 1:1 ratio between axis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` r | |
library(tidyverse) | |
#> Warning: package 'tidyverse' was built under R version 4.0.4 | |
ggplot(mtcars, aes(disp, hp)) + | |
geom_point() + | |
#fijar el ratio de escala entre los ejes X y Y | |
coord_fixed(ratio = 1) + | |
#definir cortes en cada eje | |
scale_y_continuous(breaks = seq(50,500,by=50)) + | |
scale_x_continuous(breaks = seq(50,500,by=50)) | |
``` | |
 | |
<sup>Created on 2021-05-04 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)</sup> |
Author
avallecam
commented
May 4, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment