r-causal / causal-inference-in-R

Causal Inference in R: A book!
https://www.r-causal.org/
165 stars 42 forks source link

ggdag code overhaul and style consistency #244

Open malcolmbarrett opened 2 weeks ago

malcolmbarrett commented 2 weeks ago

Once ggdag 0.3.0 is out, I'll need to overhaul the syntax here. Currently, it's a mix of newer and older ways of doing things.

Relatedly, in #243, I found that our habit of using a modified label geom wasn't working well for the more complex alternative DAGs in that chapter, so I explored a different style using a text repel and lighter arrows. I also learned recently that ggrepel has a newish way of having a bit more control over the repulsion that looks appealing for DAGs. So, I'd like to make sure that we're consistent with what we do, although I don't think there's one way that will always be best. This approach may have an issue with visibility for those with visual impairments because of the light-on-light colors. I'm not sure.