Open henriquesposito opened 11 months ago
For the time being, shape is not mapped according to variable, it is just set as an aesthetic in autographr()
with the '.infer_nshape()' helper function. For this reason, guides also do not work for shape at the moment (see #52).
Because we rely on both ggplot2 and ggraph packages in our functions substituting color by fill returns unexpected results (e.g. aesthetics mapped correctly but colors are the same). However, we now consistently map node colors and sizes and this improves the function consistency.
@jhollway I am going through the open issues and I am wondering if we should close this issue since it was addressed (as much possible) in the recent changes related to how graphr()
works? Thank you.
graphr(ison_lawfirm, node_color = "school", node_size = 6)
still uses the color geom and not fill.
This issue is a bottleneck for themes like 'crisp' that would require e.g. nodes with a separate (white) fill and (black) outline.
Currently we rely on the color aesthetics to color the inside of nodes. However, once node colors and shapes are declared, color becomes the outside color.
For example,
autographr(ison_lawfirm, node_color = "school")
andautographr(ison_lawfirm, node_color = "school", node_shape = "practice")
.This happens because of inconsistencies in using both ggplot2 and ggraph packages in our functions. By refactoring and making code more consistent, will allow that we use color for the outside and fill for inside colors throughout. That is, we will have the "node_color" and "node_fill" arguments in the autographr/s/d functions.