rotate text and decrease text size in ggplot

20 views
Skip to first unread message

Konstantinos Petridis

unread,
Apr 15, 2016, 3:37:45 AM4/15/16
to ggplot2
Dear all,

I have a very simple line chart but in the x-axis my observations look like that

item1, item2 etc

Therefore when I want to plot it the x-axis doesn't make any sense.

I have done the following:

ggplot(data=xx, aes(x=Items, y=Y1, group=1))+
  scale_size_area()+
  labs(size=Items,
       x="forecasting technique (DMU)",
       y=expression(rho))+
  geom_line(linetype="dashed",size=0.4)

where Items=item1,...,item198 and Y1 is a number between [0,1]

I want to rotate the labels in the x-axis and reduce the text.

Could you please help me do that?

Best regards,

Kostas

Roman Luštrik

unread,
Apr 15, 2016, 3:55:46 AM4/15/16
to Konstantinos Petridis, ggplot2
You can start here:


Parameters that are passed to element_text are available here: http://docs.ggplot2.org/current/element_text.html

Cheers,
Roman

--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
In God we trust, all others bring data.

Konstantinos Petridis

unread,
Apr 15, 2016, 4:01:20 AM4/15/16
to ggplot2, costas.e...@gmail.com
It worked.

Thank you so much Roman.
Reply all
Reply to author
Forward
0 new messages