Gnuplot:填充和 fsteps

问题描述 投票:0回答:1

我有每日数据(每天一个点),我使用

fillsteps
用 Gnuplot 绘制这些数据。
fillsteps
填充用
steps
和零绘制的线条之间的空间。

但是,我想要的是填充用

fsteps
和零完成的线之间的空间。

想到的最简单的方法是完全避免

fsteps
并添加点以制作楼梯,然后用
filledcurves
填充它。

  1. 有更简单的方法吗?也许使用
    boxes
    会更容易?
  2. 假设我选择楼梯,因为我不精通 Gnuplot,所以我会在 Gnuplot 之外创建楼梯;有没有一种简单的方法可以在 Gnuplot 中创建它?
gnuplot
1个回答
0
投票

您要求的是步骤的另一种变体,这些步骤未在 gnuplot 中作为直接绘图样式涵盖,如这些示例中所示。 你必须自己做。是的,你可以做到

with boxxyerror
,检查
help boxxy

脚本:

### plot with filled fsteps
reset session

$Data <<EOD
0   1
1   4
3   3
6   7
7   5
EOD

set offset 1,1,1,0
set style fill solid 0.3 noborder
set tics out
set key noautotitle invert

plot x1=y1=NaN $Data u (x0=x1,x1=$1,y0=y1,y1=$2,(x1+x0)/2): \
        (y1/2):((x1-x0)/2):(y1/2) w boxxy lc "green" ti "filled fsteps", \
        '' u 1:2 w fsteps lw 2 lc "red" ti "fsteps"
### end script

结果:

© www.soinside.com 2019 - 2024. All rights reserved.