- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 bash 脚本中使用 gnuplot 来绘制一些东西。
对于这个特殊图形,我需要以矩阵大小为 x 轴打印矩阵的数量(y 轴)。
由于分布可能非常稀疏,我想对 x 和 y 使用对数刻度。它适用于 y,但 gnuplot 告诉我,当我使用直方图样式时,我无法为 x 轴设置对数刻度。
任何想法来调试这个?或者如何使用类似的方式呈现结果?
set style data histogram
set style histogram cluster gap 1
set style fill solid border -1
set logscale xy
plot '$res/histo-$ld-$lr-$e-$r' using 2:xtic(1) title 'Run'
line 0: Log scale on X is incompatible with histogram plots
最佳答案
Gnuplot 直方图的工作方式与您的想法略有不同。 x 轴不是数字。在您的情况下,第一行第二列中的值放置在 x 值为 0 处,y 值取自第二列,手动标签取自第一列第一行。第二行的值放置在 x=1 等处。
您可以尝试使用框绘图样式,该样式与“常规”x 轴一起使用并支持 x 中的对数刻度:
set logscale xy
set offset 0,0,1,1
set boxwidth 0.9 relative
set style fill solid noborder
plot 'data.dat' with boxes
data.dat
1 1000
2 300
5 150
20 10
135 3
set logscale xy
set offset 0,0,1,1
set style fill solid noborder
plot 'data.dat' using 1:2:($1*0.5) with boxes
set logscale xy
set offset 0,0,1,1
set style fill solid noborder
plot 'data.dat' using 1:2:($1*0.5):xtic(1) with boxes
关于Gnuplot 直方图 x logscale,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24207850/
我放了一个 xlogscale,它弄乱了网格线的绘制。主要 x 网格线不再与主要 y 网格线相同,它们是次要 x 和 y 网格线的灰色。 下面的图片显示了这一点。 关于如何解决这个问题的任何想法? 谢
我在 bash 脚本中使用 gnuplot 来绘制一些东西。 对于这个特殊图形,我需要以矩阵大小为 x 轴打印矩阵的数量(y 轴)。 由于分布可能非常稀疏,我想对 x 和 y 使用对数刻度。它适用于
我正在使用 Google Charts 制作条形图,并尝试让图表在垂直轴上使用对数刻度,但由于某种原因它不起作用。我尝试过使用 logScale 和 scaleType 但它们都不起作用。 这是我的代
我正在尝试绘制具有对数刻度的 Google 条形图。但是,它从 1 开始,而不是 0。这看起来像是错误数据,因为具有一个值的条目在呈现时没有条形。我尝试将 minValue 设置为零,但当 logSc
我已经成功地在 gnuplot 中以正常比例制作了一个漂亮的直方图,但是当我添加时 set logscale y 到我的代码,数据消失。 我发现 logscale 不适用于我用来制作直方图的函数(如下
我正在尝试用 ggplot2 创建一个热图(你看下面的代码)现在有两件事我想改变: 我绘制了 pValues(希望它非常小)所以我想绘制颜色对数标度。我尝试了不同变体的 trans="log",但没有
我定义了一个函数 f()我想以与 logscale 类似的方式用于缩放(但 f() 不是对数函数)。有没有办法自动执行,例如 set fscale y ? 否则我试图绘制缩放函数: plot 'dat
我试图在对数刻度上绘制以下数字作为 matplotlib 中的散点图。 x 和 y 轴上的数量都具有非常不同的尺度,其中一个变量具有巨大的动态范围(大致接近 0 到 1200 万),而另一个变量在接近
我是一名优秀的程序员,十分优秀!