I have a dataframe with values of B, P anda e, so i want to make a plot like this, but the problem is this black line that touch the y axis in 1.0 and x axis past 1.0 , it should be like a function where every point is given by the function B + P = e, but i don’t know how to make that condition to plot that line in abline. someone give me a light?
This is the code that i made, that already have the points, but I need them to be distinguished by color, like the example, and that diagonal line
filter(!is.na(period),
!is.na(air_force),
!is.na(air_speed),
!is.na(shear),
!is.na(buoyancy),
!is.na(V_TKE),
!is.na(eps_u),
buoyancy >= 0,
level != 75) %>%
ggplot(aes(x = (buoyancy/eps_u), y = (-shear/eps_u)))+
geom_point(alpha = 1, shape = 4)+
geom_hline(yintercept = 0) +
geom_vline(xintercept = 0)+
coord_cartesian(ylim = c(-0.5, 1.5),
xlim = c(0, 3)) ```
[](https://i.sstatic.net/D5iKcy4E.png)