I wanted to ask for any general idea about plotting this kind of plot in R which can compare for example the overlaps of different methods listed on the horizontal and vertical side of the plot? Any sample code or something
Many thanks
A ggplot2-example:
# data generation
df <- matrix(runif(25), nrow = 5)
# bring data to long format
require(reshape2)
dfm <- melt(df)
# plot
require(ggplot2)
ggplot(dfm, aes(x = Var1, y = Var2)) +
geom_tile(aes(fill = value)) +
geom_text(aes(label = round(value, 2)))
corrplotパッケージとcorrplot
そのパッケージ内の関数は、上に示したものと同様のプロットを作成します。これにより、必要なことを実行したり、開始点を提供したりできます。
より詳細な制御が必要な場合は、関数を使用して色をプロットしてからimage
、関数を使用しtext
て数値を追加できます。余白にテキストを配置するのに十分な大きさの余白を作成できます。余白axis
にテキストラベルを追加する一般的な方法については、関数を参照してください。または、内部に十分なスペースを残して(おそらくrasterImage
の代わりにimage
使用)text
、ラベル付けを行うために使用することもできます。線と、線のセグメントの座標を支援する関数を追加するかどうかのxpd
引数を見てください。par
grconvertX
grconvertY