On An Angle

June 11, 2011

I’m doing some quick-and-dirty analyses on help phone hotline counts compared with PM2.5 concentrations related to forest fire smoke.  I don’t have a lot of faith in these data to be sensitive to the smoke signal, so I don’t intend to spend a lot of time making really good code for the data exploration — there’s just no payoff.  I got the plots doing what I wanted and decided that I should add some kind of date to the X-axis to make life easier for other viewers down the road.  I stuck in an axis() with labels where I wanted them, but the dates were too long and they wouldn’t fit nicely.  I turned the labels 90 degrees and they bled off the plotting area unless they were in a tiny font.  I didn’t want to start messing with the margins, but I figured there must be some way to put the labels at an angle.  Googling it produced this:

http://jnlnet.wordpress.com/2009/05/20/x-axis-labels-on-a-45-degree-angle-using-r/#comment-61

Which, in turn, produced this:

As suspected, the data (in this case) are not strongly associated with the event of interest (lots of smoke — over the 95%ile of summer days).  Here’s the code, in case you’re interested:

Advertisement

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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.