I get stucked in a code trying to plot a points that must be visualized in blue for positive and red for negative numbers, as follow:
ggplot(BCG, aes( reorder(x = SHARE, desc(SHARE)),
y = ATRATIVIDADE, color = CURSO))+
geom_point( size = log2(BCG$MARGEM),
show.legend = FALSE) +
scale_color_manual(values = ifelse(BCG$MARGEM > 0, 'navy', 'firebrick')) +
geom_text_repel(label = BCG$MARGEM,
size= 3,
alpha = .9,
show.legend = FALSE)
Houever, the plot shows positive numbers in red and vice-versa:
Someone, please, could explain waht I am doing wrong? I really will appreciate your help!
Best,
A