简体   繁体   English

GNUPlot相当于六倍体的高密度散点图

[英]GNUPlot equivalent of hexbin, high-density scatterplot

I have a plot like this, which I would like to change: 我有一个这样的情节,我想更改:

在此处输入图片说明

I would like to make this a density plot, like the hexbin below: 我想将此绘制为密度图,例如下面的六边形:

http://www.exegetic.biz/blog/wp-content/uploads/2013/05/hexbin-mass-height.png

where each of the colors in the first figure can have its own unique color gradient I am not happy with R's hexbin, as it does not allow logarithmic scales as I need in the first figure. 第一个图形中的每种颜色都可以具有自己独特的颜色渐变,我对R的hexbin感到不满意,因为它不允许我在第一个图形中需要对数刻度。 Another benefit of this binning is that I can make an encapsulated postscript output, as an EPS of the first file is large & unopenable. 这种分箱的另一个好处是,由于第一个文件的EPS很大且无法打开,因此我可以封装后的脚本输出。

I've seen density plots in pm3d, but doing this with more than one set of data doesn't make sense (8 different color gradients in the right side would look bad) 我已经在pm3d中看到了密度图,但是用不止一组数据进行此操作是没有意义的(右侧的8种不同的颜色渐变看起来很糟糕)

How can I do hexbin-like plots in gnuplot? 我该如何在gnuplot中生成类似hexbin的图?

Per @Henk: 每@Henk:

library(gridExtra)
library(ggplot2)

grid.arrange(
  ggplot(diamonds, aes(carat, price)) + geom_hex() + scale_y_continuous(name="identity", trans="identity"),
  ggplot(diamonds, aes(carat, price)) + geom_hex() + scale_y_continuous(name="sqrt", trans="sqrt"),
  ggplot(diamonds, aes(carat, price)) + geom_hex() + scale_y_continuous(name="log10", trans="log10"),
  ggplot(diamonds, aes(carat, price)) + geom_hex() + scale_y_continuous(name="log2", trans="log2"),
  ncol=1)

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM