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

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. js的单引号,双引号,转移符

    这里我们看到想在style后边在插入一个样式的变量,data.cssSytle.a是做边和邮编都是"",并且没有转移符

  2. Social Emotional Computing

    from:数理情感学 http://choudh.blogchina.com/2556171.html 第五节  情感的三要素 人对于某一事物的情感,不仅取决于该事物的品质特性(如物理特性.化学特性. ...

  3. wsdl中含ref="s:schema"时处理的

    dos窗口,在生成客户端代码的时候,出现了下图所示的错误: java是通过JAXB解析wsdl文件的,出现这种错误的原因是: 是JAXB目前还不支持ref 这种元素的解析 s:schema是types ...

  4. $(document).ready()和window.onload的区别

    来源于: The window.onload event fires when a document is completely downloaded to the browser. This mea ...

  5. 理解MySQL数据库覆盖索引

    话说有这么一个表: CREATE TABLE `user_group` ( `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL, ...

  6. Java创始人

    詹姆斯·高斯林(英语:James Gosling,1955年5月19日-),出生于加拿大,软件专家,Java编程语言的共同创始人之一,一般公认他为“Java之父”. 在他12岁的时候,他已能设计电子游 ...

  7. git 创建别名

    git config --global alias.shortname command 例子如下 git config --global alias.psm 'push origin master' ...

  8. 去掉iPhone、iPad的默认按钮样式 去掉高光样式:

    input[type="button"], input[type="submit"], input[type="reset"] { -web ...

  9. java基础2.0:Object、Class、克隆、异常编程

    Java编程中两个重要的类Object 和 Class及java异常编程 (1)是所有Java类(API提供的类.自定义类)的最终父类. (2)作用:在JVM管理对象中的过程中,有一套统一的类型检查和 ...

  10. String,Date,XMLGregorianCalendar的转换

    常见标准的写法"yyyy-MM-dd HH:mm:ss",区分大小写,时间是24小时制,24小时制转换成12小时制只需将HH改成hh. String to Date: String ...