This is an example of creating what could be a legend for a heat map, demonstrating the simple use of a data-driven linear gradient with D3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This second example runs Trueskill on a tennis tournament, the Australian Open. | |
# Note that actual computation is commented out as it takes about ~40 seconds to | |
# update skill ratings over 127 matches. | |
library(trueskill) | |
# Data format of ausopen2012 is: Player, Opponent, Margin, Round, WRank, LRank | |
data("ausopen2012") | |
# create match_id in order to reshape |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## reproduce the figures from http://www.jstatsoft.org/v28/c01/paper using ggplot2 | |
library(ggplot2) | |
## parameters | |
set.seed(2710) | |
## Figure 1 | |
d <- rnorm(50) |
NewerOlder