【问题标题】:Change colors in Gnuplot like the ones from the gallery在 Gnuplot 中更改颜色,就像画廊中的颜色一样
【发布时间】:2013-05-12 15:59:34
【问题描述】:

我使用 Google 并在 stackexchange、stackoverflow 上进行了搜索。 我怎样才能从 http://gnuplot.sourceforge.net/demo/simple.html 用那里的颜色?

使用给定的脚本

# set terminal pngcairo  transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 
# set output 'simple.1.png'
set key inside left top vertical Right noreverse enhanced autotitles box linetype -1 linewidth 1.000
set samples 50, 50
plot [-10:10] sin(x),atan(x),cos(atan(x))

在 gnuplot (windows 7) 上总是产生一个颜色为绿色、红色、蓝色的图: http://imageshack.us/photo/my-images/23/unbenanntfkh.png/

我知道我可以为每个函数指定颜色。我可以在哪里更改(全局)绘图中的颜色?

【问题讨论】:

    标签: colors gnuplot color-scheme


    【解决方案1】:

    您可以使用set linetype 定义默认线型。

    set linetype 1 lc rgb "blue"
    set linetype 2 lc rgb "#EE5500"  
    

    " set linetype 命令允许您重新定义使用的基本线型 对于地块。命令选项与“设置样式线”的选项相同。 与线条样式不同,set linetype 的重新定义是持久的;他们 不受reset的影响。”

    要在每个 gnuplot 会话上自动加载您的设置,只需将这些命令放入 gnuplot 配置文件中,在 linux/unix 上为 .gnuplot在 Windows 上为 GNUPLOT.INI

    【讨论】:

    • 谢谢。寻找 gnuplot.ini 将我带到无法在便携式版本中自动加载的“colors_default.gp”。不幸的是,我总是不得不手动执行 wgnuplot 中的内容。
    猜你喜欢
    • 2018-01-24
    • 2020-08-15
    • 2010-12-12
    • 1970-01-01
    • 2014-08-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多