THIS BLOG DOES NOT CONSTITUTE INVESTMENT ADVICE. ACTING ON IT WILL MOST LIKELY BE DETRIMENTAL TO YOUR FINANCIAL HEALTH.After following some R-related quant finance blogs like Timely Portfolio, Systematic Investor or Quantitative tho...

Let’s say you have several categories with multiple data points each that you would like to plot as individual points. Even if you have only a single point, the R graphics package will plot a line (without a box for … Continue reading →

Sometimes when working with small paired data-sets it is nice to see/show all the data in a structured form. For example when looking at pre-post comparisons, connected dots are a natural way to visualize which data-points belong together. In R this can be easily be combined with boxplots expressing the overall distribution of the data. This

Here are a few more plotting options for boxplots: Let’s start plotting the full set plot(b$mod, b$x) Plot labels for a subset in full set plot (label all points x < -1) text(subset(b$mod, b$x < -1), subset(b$x, b$x < -1), … Continue reading →

A violin plot is a combination of a boxplot and a kernel density plot. Lattice includes the panel.violin function for this graphical tool. This example draws a violin and a boxplot together. First, let’s download some solar radiation data from the NASA webpage: nasafile <- 'http://eosweb.larc.nasa.gov/sse/global/text/global_radiation' nasa <- read.table(file=nasafile, skip=13, header=TRUE) Now, I plot a

(The image above is called a “Beeswarm Boxplot” , the code for producing this image is provided at the end of this post) The above plot is implemented under different names in different softwares. This “Scatter Dot Beeswarm Box Violin – plot” (in the lack of an agreed upon term) is a one-dimensional scatter plot