Skip to content

Commit b042d33

Browse files
committed
docs(readme): add percent scale in plot
1 parent aa99000 commit b042d33

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Imports:
2323
Suggests:
2424
ggplot2,
2525
readxl,
26+
scales,
2627
testthat (>= 3.0.0)
2728
Config/testthat/edition: 3
2829
Encoding: UTF-8

README.Rmd

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,15 @@ subset(yield_curve, maturity == "10 year") |>
7171
legend.title = element_blank(),
7272
legend.position = "top",
7373
plot.title = element_text(face = "bold"),
74-
plot.caption = element_text(
75-
hjust = 0, vjust = 0, size = 8, margin = margin(10, 0, 0, 0)
76-
),
77-
panel.grid.major.y = element_line(color = "black", linewidth = 0.2),
74+
plot.caption = element_text(hjust = 0, vjust = 0, size = 8, margin = margin(10, 0, 0, 0)),
7875
panel.grid.major.x = element_blank(),
76+
panel.grid.major.y = element_line(color = "black", linewidth = 0.2),
7977
panel.grid.minor = element_blank(),
8078
axis.text = element_text(color = "black"),
8179
axis.title = element_blank(),
8280
plot.margin = margin(10, 10, 10, 10)
8381
) +
82+
scale_y_continuous(labels = scales::label_percent(scale = 1L)) +
8483
labs(title = "US Treasury Yield Curve 2023 (10 Year Maturity)")
8584
```
8685

man/figures/README-plot-1.png

6.31 KB
Loading

0 commit comments

Comments
 (0)