![]() Scale_y_continuous(limits=c(ylimitmin5,ylimitmax5), labels=dollar_format(prefix="$"),īreaks = seq(ylimitmin5, ylimitmax5, by = 10000),Īnnotate("text", x=floor_date(max(sa_dat1$variable), "month") - months(12), Theme( = element_text(angle = 90, hjust = 1,vjust=0.5)) + Geom_smooth(method="loess", se=FALSE, linetype = "dashed", color="black", size = 0.5) + Here is what I tried so far, myplot <- ggplot(sa_dat1, aes(x = variable, y = value )) + And the text box should point the corresponding value in the plot using an arrow or line. The logic should be - every time when we generate the plot, it should have the text box with latest month and value in it. ![]() I have added the text using text geom in annotate. I am trying to add an annotation box in plot (using ggplot). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |