[caption id=”attachment_427” align=”aligncenter” width=”740”] Fig: Convincing (Munroe 2011b).[/caption]
First, what is XKCD? Well, the website describes itself as follows:
"Stick-figure strip featuring humour about technology, science, mathematics and relationships, by Randall Munroe."
It brought me laughter many times ever since I knew its existence. There's even a subreddit on Reddit of XKCD! Just recently, I realized the existence of this fantastic R package also called "xkcd" which makes serious R plots into super cute ones! That's worth a new post, so the following will basically be reproducing from the R package tutorial with my own tiny edits to give you some visual pleasure :P
Note that for the R package "xkcd" to take effect, you need first check whether you have the "xkcd" font installed on your computer. Ok, some of you may know that you can produce such graphs in python and latex, but it's actually not that hard to do it in R as well. So I basically tweaked the original code in this tutorial a little bit, and generated the following plot:
And just one more for a belated Happy Mother's day...
With code attached:
It's pretty easy to generate the data yourself, and feed that into the above code. Voila shows the plot!
Hmm... Can't help but wonder when will I be able to use ggplot with The Oatmeal theme.
Just a bit of a discursion at the end, definitely another boon to all of us! Now that plotting in R tickled my fancy, I discovered also that there is an R package called "quantmod", which does a very good job in financial plots. For example, just no more than five lines of code and we can see how Apple (the tech company of course...) is doing recently, which I found to be quite impressive. The code for generating the following plot is as follows: