how we use gghoriplot package if we apply that package for a data set consists of three variables, my ninitial ggplot is scatter plot and i want to apply geom_horizon

ggpoint_chart <- ggplot(data = Final_complete_data, aes(x = mean_maxpost_discharge, y = mean_dissolved_oxygen)) +
geom_point(alpha = 0.3, size = 3) +
facet_wrap(~ month, scales = "free", ncol = 4) +
labs(
x = "Maxpost Discharge",
y = "Dissolved Oxygen",
title = "Maxpost Discharge vs. Dissolved Oxygen"
) +
scale_x_continuous(breaks = seq(30, 90, 20), limits = c(30, 90)) +
scale_y_continuous(breaks = seq(7.5, 8.5, 0.25), limits = c(7.5, 8.5),
expand = expansion(mult = c(0.05, 0.05))) +
theme_minimal() +
theme(
legend.position = "top",
panel.grid.major = element_line(color = "gray", linewidth = 0.3),
panel.grid.minor = element_line(color = "lightgray", linewidth = 0.2),
panel.background = element_rect(fill = "yellow")
)
ggpoint_chart
ggpoint_chart_save <- ggsave("ggpoint_chart.pdf", plot = ggpoint_chart, width = 10, height = 6)

Welcome to the forum

Thanks for the code but I think we also need some sample data.

A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. Just do dput(mydata) where mydata is your data. Copy the output and paste it here between
```

```

What did you want to do with geom_horizon ?

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.