I am trying to add gridlines and axis ticks to the ternary plot. I was able to adjust the numeric values of the axis, but unable to get axis ticks and grids inside the plot.
Here is an example R code:
library(ggplot2)
# Example data
x <- rnorm(100)
y <- rnorm(100)
z<-rnorm(100)
df <- data.frame(x, y, z)
# Create scatter plot with grid lines
ggtern(df, aes(x, y, z)) +
geom_point() +
theme_showgrid()+
theme(panel.grid.major = element_line(color = "grey", linetype = "dashed"),
panel.grid.minor = element_line(color = "grey", linetype = "dashed"))
I am getting this
I want this