设置图中连线的颜色、宽度、连线样式等

set style line

每个显示终端都有默认的线类型和点类型集合,可以通过在命令行输入: test查看,如下图显示了在wxt终端模式下默认的线的集合和点的集合

set style line命令定义了一组线的类型和宽度及点的类型集合,方便后面通过索引号来调用,而不用每次都输入一遍set style line命令来设置。

Syntax:

      set style line <index> default
set style line <index> {{linetype | lt} <line_type> | <colorspec>}
{{linecolor | lc} <colorspec>}
{{linewidth | lw} <line_width>}
{{pointtype | pt} <point_type>}
{{pointsize | ps} <point_size>}
{{pointinterval | pi} <interval>}
{palette}
unset style line
show style line

default 参数设置具有相同索引号的线风格为默认值,如set style line 5 default意思是设置索引号为5的线的风格为 默认的风格

线的风格包括:

1、线的类型linetype简写为lt,默认的linetype如下图

2、线的颜色:linecolor简写为lc,后面跟的值为:

where <colorspec> has one of the following forms:

      rgbcolor "colorname"    # e.g. "blue"
rgbcolor "0xRRGGBB" # string containing hexadecimal constant
rgbcolor "0xAARRGGBB" # string containing hexadecimal constant
rgbcolor "#RRGGBB" # string containing hexadecimal in x11 format
rgbcolor "#AARRGGBB" # string containing hexadecimal in x11 format
rgbcolor <integer val> # integer value representing AARRGGBB
rgbcolor variable # integer value is read from input file
palette frac <val> # <val> runs from 0 to 1
palette cb <value> # <val> lies within cbrange
palette z
variable # color index is read from input file
bgnd # background color
black

3、线的宽度:linewidth、点的风格:pointtype、pointsize等同样的道理,可以查询具体的可选值

例如:在命令行输入 plot 'datafile.dat' w linespoint ,显示如下图

输入: plot 'datafile.dat' w linespoint lt 2表示使用2号linetype线型,显示如下图

该图显示的是默认的linetype 2的风格,如果想改变线的颜色,则可以在命令后面继续跟上lc ‘red’

在命令行提示符后面输入:plot 'datafile.dat' w linespoint lt 2 lc 'red',则lc参数覆盖了默认lt显示线的颜色,如下图

当然也可以改变线的宽度、点的类型等

输入:plot 'datafile.dat' w linespoint lt 2 lc 'red' lw 2 pt 3

可以看到线的宽度、点的类型都变了,其他想设置什么自己练练吧

gnuplot使用2的更多相关文章

  1. gnuplot: 一种更为简洁的曲线,柱状图绘图软件

    gnuplot: 一种更为简洁的曲线,柱状图绘图软件 gnuplot: 一种更为简洁的曲线,柱状图绘图软件 Zhong Xiewei Wed Jun 25 gnuplot简单介绍 关于gnuplot的 ...

  2. gnuplot使用,操作,保存等教程

    gnuplot绘制图像并保存 对于在Linux下工作的人,如果你经常要画一些二维图和简单的三维图的话,那么,gnuplot无疑是一个非常好的选择,不仅图形漂亮,而且操作简单.当然如果需要质量更高的三维 ...

  3. gnuplot安装的小问题

    今天在学习NS2的过程中接触到了awk和gnuplot来分析延迟,丢包等情况. gnuplot是一款非常精巧的绘图工具,使用方法也很简单,功能却很强大. 安装还是通过终端: sudo apt-get ...

  4. gnuplot 的安装

    需要同时安装gnuplot和gnuplot-x11才能画出图 sudo apt-get install gnuplot gnuplot-x11 gnuplot not showing the grap ...

  5. gnuplot conditional plotting: plot col A:col B if col C == x

    http://stackoverflow.com/questions/6564561/gnuplot-conditional-plotting-plot-col-acol-b-if-col-c-x H ...

  6. gnuplot配置HOME目录

    http://blog.csdn.net/jspenliany/article/details/39828261 本人使用gnuplot绘图,使用console version的来进行处理的时候,经常 ...

  7. gnuplot使用3

    linetype set linetype命令允许用户重定义默认的显示线的类型,该命令的选项跟"set style line"是一样的.于"set style line& ...

  8. gnuplot使用1

    安装之后,迫切需要运行一个程序来看看,首先要找到软件默认的使用路径: 输入 show loadpath命令就会显示默认查找的几个路径, loadpath is loadpath from GNUPLO ...

  9. gnuplot安装问题(set terminal "unknown")

    今天在系统同上要装个gnuplot,原来用的都是拷好的虚拟机.这也是第一次装.本来以为分分钟的事,却不料遇到不少麻烦.记录一下,供大家参考 一,快速开始安装 ubuntu下那自然是: sudo apt ...

  10. GNUPLOT 画多组柱状图 以及 折线图 以及各种问题的解决方案

    在Windows下使用客户端,直接可以打开.plt文件的gnuplot格式的文件,open->xx.plt 在Linux下使用shell 运行gnuplot脚本, 结果一闪而过.解决办法是在 程 ...

随机推荐

  1. promise的学习

    为了解决回调地狱的问题,所以出现了promise的设计思想. promise的三种状态: pending 等待状态 resolved 完成状态 rejected 拒绝状态 promise的三种状态,只 ...

  2. 隐马尔可夫模型(Hidden Markov Model,HMM)

    介绍 崔晓源 翻译 我们通常都习惯寻找一个事物在一段时间里的变化规律.在很多领域我们都希望找到这个规律,比如计算机中的指令顺序,句子中的词顺序和语音中的词顺序等等.一个最适用的例子就是天气的预测. 首 ...

  3. MATLAB实现频数直方图——hist的使用

      "hist" is short for "Histogram(直方图.柱状图)". 1.N = hist(Y) bins the elements of Y ...

  4. 【转】关于Class.forName(“com.mysql.jdbc.Driver”)

    原文:http://www.cnblogs.com/gaojing/archive/2012/03/23/2413638.html 传统的使用jdbc来访问数据库的流程为: Class.forName ...

  5. 东大OJ-1544: GG的战争法则

    题目描述 你在桥上看风景 看风景的人在楼上看你 明月装饰了你的窗子 你装饰了我的梦 这是GG在长坂坡发出的感叹. 三年前GG莫名的穿越到了三国时期,在这三年里他看尽了各种杀戮,心里早已麻木.GG他渴望 ...

  6. Adobe Flash builder 4.6破解教程(以win764bit为例)

    首先安装软件至默认路径: C:\Program Files(X86)\Adobe下 然后: 1.C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6 ...

  7. XML的总结学习

    XML 指可扩展标记语言(eXtensible Markup Language). XML 被设计用来传输和存储数据. HTML 被设计用来显示数据.  (一切都是为了数据:采集.整理.存储.传输.显 ...

  8. AngularJS指令的详解

    指令作为AngularJS中最为重要的部分,所以这个框架本身也是自带了比较多的的指令,但是在开发中,这些指令通常不能满足我们的需要,所以我们也是需要自定义一些指令的.指令是我们用来扩展浏览器能力的技术 ...

  9. 一个Activity掌握Android4.0新控件 (转)

    原文地址:http://blog.csdn.net/lavor_zl/article/details/51261380 谷歌在推出Android4.0的同时推出了一些新控件,Android4.0中最常 ...

  10. [转]用jpa创建web项目,报错:No persistence units parsed from {classpath*:META-INF/persistence.xml}

    原文地址:http://blog.sina.com.cn/s/blog_6826662b01015opk.html 最近做一个web项目用到了Spring+JPA,由于没有正确配置persistenc ...