1652 search results for "ggplot2"

Horizon on ggplot2

August 27, 2012
By
Horizon on ggplot2

SocialDataBlog’s kind reference in post Horizon plots with ggplot (not) motivated me to finish what the post started.  I knew that ggplot2 would be a little more difficult to use for the purpose of a horizon plot, but I felt compelled to provide...

Read more »

Heatmap tables with ggplot2, sort-of

August 27, 2012
By
Heatmap tables with ggplot2, sort-of

I wrote before about heatmap tables as a better way of producing frequency or other tables, with a solution which works nicely in latex. It is possible to do them much more easily in ggplot2, like this library(Hmisc) library(ggplot2) library(reshape) data(HairEyeColor) P=t(HairEyeColor) Pm=melt(P) ggfluctuation(Pm,type="heatmap")+geom_text(aes(label=Pm$value),colour="white")+ opts(axis.text.x=theme_text(size = 15),axis.text.y=theme_text(size = 15)) Note that ggfluctuation will also take

Read more »

ggplot2 Self-deprecation

August 24, 2012
By
ggplot2 Self-deprecation

I've been in China working for a few weeks (where this blog is (oddly) blocked). So, I haven't been able to post much over the summer. To kick things off for the new (academic) year, I thought I might just re-post something good I saw on the Book of Sa...

Read more »

ggplot2 maps with insets

August 22, 2012
By
ggplot2 maps with insets

Here's a quick demo of creating a map with an inset within it using ggplot. The inset is achieved using the gridExtra package.Install libraries, set directory, read filesetwd("/Users/ScottMac/Dropbox/CANPOLIN_networks_ms/data") # change ...

Read more »

Heatmap tables with ggplot2

August 20, 2012
By
Heatmap tables with ggplot2

I wrote before about heatmap tables as a better way of producing frequency or other tables, with a solution which works nicely in latex. It is possible to do them much more easily in ggplot2, like this library(Hmisc) library(ggplot2) library(reshape) data(HairEyeColor) P=t(HairEyeColor) Pm=melt(P) ggfluctuation(Pm,type="heatmap")+geom_text(aes(label=Pm$value),colour="white")+ opts(axis.text.x=theme_text(size = 15),axis.text.y=theme_text(size = 15)) Note that ggfluctuation will also take … Continue reading...

Read more »

Horizon plots with ggplot2, sort-of

August 19, 2012
By
Horizon plots with ggplot2, sort-of

The Timely Portfolio blog via R-bloggers has recently published some interesting entries about the value of horizon plots for visual comparison of a number of time series. Very nice it looks too. You can read more about them here. The trick to understanding them is to imagine that each row was orginally a line chart … Continue reading...

Read more »

Custom axis transformations in ggplot2

August 14, 2012
By

To apply a data transformation on an axis in a ggplot, you can use coordinate transformations. For more detail see the ggplot2 documentation. A number of coordinate transformations is available, including log10 and sqrt. However, if you want to perform… See more ›

Read more »

Hadley Wickham’s ggplot2 basics

August 1, 2012
By

If you haven't made the plunge yet to making R graphics with Hadley Wickham's ggplot2 package, his "ggplot2 basics" slides (from the recent Introduction to Data Visualization and Analysis course at JSM) is a good place to start. Once you get the hang of the "grammar of graphics" notation, you'll be building beautiful data visualizations like this or this...

Read more »

ggplot2: A little twist on back-to-back bar charts

July 27, 2012
By
ggplot2: A little twist on back-to-back bar charts

Sangyoon Lee BackgroundWhile thinking about ways to represent incoming and outgoing flows in a business process, I thought about using export-import charts like the one shown here in the Learning R blog. However, as the author acknowledges, it is difficult to compare individual values using these charts. Regardless, I still wanted to have...

Read more »

Plotting the Frequency of Twitter Hashtag Usage Over Time with R and ggplot2

July 17, 2012
By
Plotting the Frequency of Twitter Hashtag Usage Over Time with R and ggplot2

The 20th annual ISMB meeting was held over the last week in Long Beach, CA. It was an incredible meeting with lots of interesting and relevant talks, and lots of folks were tweeting the conference, usually with at least a few people in each concurrent ...

Read more »