Skip to content

Label axis with strings instead of numbers

4 messages · seanlilley, Rui Barradas

#
I have created a bubble plot in R using the following formula:

symbols(Data$Day.Number,Data$Team,circles=Data$Total.amount, inches=0.5,
fg="white",bg="red",xlab="Day Number",ylab="Team")

The data set is called Data, and I have the columns Day.Number, Team and
Total.amount.

The data is plotting fine, but where my y axis should have the names of each
team, it instead labels 1,2,3,4,,,,

How do I edit this to label the axis with the names of the teams instead?

Thanks
Sean



--
View this message in context: http://r.789695.n4.nabble.com/Label-axis-with-strings-instead-of-numbers-tp4651275.html
Sent from the R help mailing list archive at Nabble.com.
#
Hello,

See the ?axis function, argument 'labels'.

Hope this helps,

Rui Barradas
Em 29-11-2012 12:20, seanlilley escreveu:
#
Hi,

The axis function plots an axis ontop of my current axis. So although I am
able to write my labels in, they are written ontop of the numbers in the
current axis rather than replacing them. Any other alternatives?

Sean



--
View this message in context: http://r.789695.n4.nabble.com/Label-axis-with-strings-instead-of-numbers-tp4651275p4651305.html
Sent from the R help mailing list archive at Nabble.com.
#
Hello,

Use argument yaxt = "n" of function symbols. yaxt means "y axis type" 
and "n" for "none" (or "no").
Then plot the axis with axis(2, ...)

Hope this helps,

Rui Barradas
Em 29-11-2012 16:17, seanlilley escreveu: