r - Changing text size on a ggplot bump plot -


I am quite new to ggplot I have created a bump plot using the code posted below. I got the code from a blog I have lost the link ....

I want to be able to increase the size of the labels (here the letters that keep very little on the left and the right plot) affect the width of the lines Without (it only makes sense after running the code)

I have to Have tried to change parameters but she always change the line width.

Any suggestions appreciated.

Tom

  Required (ggplot2) df & lt; -matrix (rnorm (520), 5, 10) # creates a random example (df, 1, rank) dfm & lt; -melt (Price.Rank) Name (DFM) & lt; -c (Surname for "Date" (DF) & lt; - Letter [1:10] Price, "Brand", "Value") P & lt; - ggplot (DFM, AES (factor (date), value, group = brand, color = brand, label = brand)) p1 & lt; - p + geom_line (AES (size = 2.2, alpha = 0.7)) + geom_text (data = subset (dfm, date == 1), aes (x = date, size = 2.2, hjust = 1, vjust = 0)) + Geom_text (data = subset (dfm), date == 5), AES (x = date, size = 2.2, hjust = 0, vjus t = 0)) + theme_bau () + opts (legend.position = "none" , Panel.border = theme_blank ()) p1 + theme_bw () + opts (legend.position = "none", panel.border = theme_blank ())  

try it

  geom_text (data = subset (DFM, date == 1), AES (x = date), size = 12, hjust = 1, vjust = 0) + geom_text (Data = subset (DFM, date == 5), AES (x = date), size = 20, Hjust = 0, vjust = 0)  

Set the size of the AES mapping.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -