【发布时间】:2015-02-05 14:14:40
【问题描述】:
我正在使用 gnuplot 5.0。每个脚本都有以下内容:
set terminal epslatex 8 color standalone colortext
问题是 gnuplot 跳过了第一行。据我所知,4.6 版本解决了类似的问题。
请对这个问题有任何想法吗?
数据文件points.dat示例
4 4
4 -4
-4 4
-4 -4
第一行 (4, 4) 被跳过。因此,gnuplot 只显示三个点,而不是四个点。在此使用的命令
#!/bin/bash
set terminal epslatex 8 color standalone colortext
set output outputFileName
set size .55,.55
set pointsize 3.0
##############
# Line styles
##############
set linestyle 1 lt 5 lw 1 #
set linestyle 2 lt 2 lw 1.5
set linestyle 3 lt 6 lw 1 #
set linestyle 4 lt 3 lw 1
set linestyle 5 lt 2 lw 2 #
set linestyle 6 lt 1 lw 2
##################
# Titles
##################
set title 'Image'
set xlabel '$x$' offset 0,0.5
set ylabel '$y$' offset 2,0
set macros
filename_init = sprintf("%s/image_init.dat",dataFileDirectory)
set key autotitle columnhead
set key horiz
set multiplot
plot
filename_init u 1:2 with points lt 0 pt 1 lw 5 lc rgb "magenta" notitle 'initial'
绕过问题的诀窍是复制第一行。但这并不实用。
【问题讨论】:
-
您的意思是您正在从数据文件中绘制曲线并且
gnuplot跳过了第一个数据点?您是否介意发布一个示例,其中包含一个简短的数据文件和触发不良行为的最少gnuplot命令集?提前谢谢你 -
命令
plot 'points.dat' using 1:2 w l绘制所有四个点,即三行。也许有些只是隐藏在边界后面。使用set offsets 1,1,1,1; plot 'points.dat' using 1:2 w l我得到了i.stack.imgur.com/kLzj9.png 5.0 的情节,这是正确的。 -
不是边框的问题。我以前版本的 gnuplot 也有类似的问题。以前的版本 4.6 解决了这个问题,现在新版本出现了。你用的是哪个终端?
-
适用于
qt和您的epslatex终端设置。 -
对不起,我用点而不是线来绘图。 @Christoph,使用积分时对你有用吗?
标签: gnuplot