# [R Graphics] Beautiful graphics thread

#### DV Man

##### New Member
Hi DV man,

Always happy for people to share graphics in the thread, but it would be particularly useful if you could also share the code with the graphics - this way people with less experience can recreate the graphics posted. This was the original intention of this thread.

Best would be if you use the $$Code:  [/ code][/math] tags to insert blocks of code that run with a single copy&paste on any system. Edit your posts if you would like to add them. TE[/QUOTE] I updated it. I didn't know including the code was part of the deal, based on the post above by bugman.$$

#### bugman

##### Super Moderator
I updated it. I didn't know including the code was part of the deal, based on the post above by bugman.
Dont drag me into it!

Anyway youll see from my earlier posts that the code is included.

#### DV Man

##### New Member
Dont drag me into it!

Anyway youll see from my earlier posts that the code is included.
Not posting your code once in this thread is a little like joining the Mafia. Once you're in, there's no getting out of it

#### DV Man

##### New Member
Dont drag me into it!

Anyway youll see from my earlier posts that the code is included.
Now you're posting the same sh/it twice. Maybe you are in the Mafia, but you do too much crank and think helicopters are following you like Ray Liotta or something.

Don't forget to pick up the blow and ask the Pittsburgh guys if they will buy the guns that Jimmy stiffed you on.

-and make sure little bro keeps stirring the gravy

#### Dason

He is a mod here which is more powerful than being in the mafia here.

#### noetsi

##### No cake for spunky
Dason's last post raises the critical question of where exactly "here" is. I bet there is a R module to tell you that...

#### DV Man

##### New Member
He is a mod here which is more powerful than being in the mafia here.
Whatever, as long as hangs out in some seedy strip club, cheats on his wife, and is constantly yelling at his "cousin" Christopher for being a mess-up in the Mob and/or in life in general

#### DV Man

##### New Member
Dason's last post raises the critical question of where exactly "here" is. I bet there is a R module to tell you that...
I think that we're in Area 51. Either that or the Matrix....

#### bugman

##### Super Moderator
Now you're posting the same sh/it twice.

Be careful DV Man. It was a tongue in check comment, nothing more nothing less.

#### DV Man

##### New Member
Be careful DV Man. It was a tongue in check comment, nothing more nothing less.
So was my comment. I was joking. I didn't mean "sh/it" as any indication that your post was of poor quality, I meant it as a way of referring to something, like "jawn." Sometimes my Philly/Wilmington way of writing comes off as if I'm trying to be rude or offensive; it's just how I talk. I thought it was clear I was kidding when I made the Goodfellas reference, but the number one rule of comedy is that if you have to explain your joke, it wasn't very funny.

#### DV Man

##### New Member
The last graphic I'll post for a while. First I made a time plot of the mean annual measurements of the level, in feet, of Lake Huron from 1875 through 1972, using the "LakeHuron" data set. Then I noticed that the mean wasn't stable over time, and that the mean appeared to have an approximately linear trend over time, so I used first differences to remove the trend. I added a smoothing curve and reference mean for each plot.

Nothing amazing, especially considering Trinker can make lines go at each other like you're playing Atari, but I figured I'd share regardless.

Code:
#First plot

plot(LakeHuron, ylab = "Mean Measurement in Feet")
abline(h = mean(LakeHuron))
lines(lowess(LakeHuron))

#Second plot featuring first differences to normalize the mean

diff(LakeHuron)
d <- diff(LakeHuron)
plot(d, ylab = "First differences of Mean Measurement in Feet")
abline(h = 0, lty = 3)
lines(lowess(d))

#### GretaGarbo

##### Human
@DV_Man. Is this a reproducible example?

You would have contributed more to this site if you had included your data. Then someone else could have reproduced what you had done and maybe given another suggestion for how to analyze the data. Maybe a time series analysis?

@DV_Man. Is this a beautiful graphics?

To me it looks like a usual line chart. Could you not at least have put some colour on the lines? And a legend explaining the curves?

The last graphic I'll post for a while. First I made a time plot of the mean annual measurements of the level, in feet, of Lake Huron from 1875 through 1972, using the "LakeHuron" data set. Then I noticed that the mean wasn't stable over time, and that the mean appeared to have an approximately linear trend over time, so I used first differences to remove the trend. I added a smoothing curve and reference mean for each plot.

Nothing amazing, especially considering Trinker can make lines go at each other like you're playing Atari, but I figured I'd share regardless.

Code:
#First plot

plot(LakeHuron, ylab = "Mean Measurement in Feet")
abline(h = mean(LakeHuron))
lines(lowess(LakeHuron))

#Second plot featuring first differences to normalize the mean

diff(LakeHuron)
d <- diff(LakeHuron)
plot(d, ylab = "First differences of Mean Measurement in Feet")
abline(h = 0, lty = 3)
lines(lowess(d))

#### DV Man

##### New Member
@DV_Man. Is this a reproducible example?

You would have contributed more to this site if you had included your data. Then someone else could have reproduced what you had done and maybe given another suggestion for how to analyze the data. Maybe a time series analysis?

@DV_Man. Is this a beautiful graphics?

To me it looks like a usual line chart. Could you not at least have put some colour on the lines? And a legend explaining the curves?
LakeHuron is a built-in data set. If my graphics aren't up to your standards, you can delete them.

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Well perhaps we could resolved you all's possible differences in what you considered "Beautiful", by also having you both provide a personal definition of what you consider "Juicy"!

Perhaps, there just needs to be a Juicy and a Beautiful thread. Maybe these constructs are discernible and not always overlapping. Superficially, one could see how lake data could be tend toward the "Juicy" side!