Adjusting point size in R plots.

The trick here is to manage the pch and cex arguments in the plot function.  You can look at more information on these arguments in ?plot, ?par and ?points in the R environment (search for cex and pch).  In general the pch argument controls which type of figure is placed in a specific point.  You can have circles, triangles, squares…  The cex argument controls the amount by which the chosen symbol is magnified.  So you can make symbols bigger or smaller.  In my case I wanted to make them smaller because the size of the original ones was making the plot look funny.  This is the command I used:

plot(variable, type='o' , pch=10, cex=.2)

This scales the symbols to a size that is manageable for me.  for the curious: pch=10 is a cool x inside a circle thingi :)

Advertisements

About joelgranados

I'm fascinated with how technology and science impact our reality and am drawn to leverage them in order to increase the potential of human activity.
This entry was posted in commands, R. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s