gnuplot配置HOME目录
http://blog.csdn.net/jspenliany/article/details/39828261
本人使用gnuplot绘图,使用console version的来进行处理的时候,经常需要切换目录,非常麻烦。希望有个办法让gnuplot在启动的时候,进入我的gnuplot工作目录。(至于gnuplot的默认work directory可以参考 help startup)
HOME目录有那么重要么?
答案是肯定的,因为gnuplot的所有命令都仅在当前工作目录(指令pwd输出的就是当前工作目录)下起作用,即在所有的绘图指令中,涉及到数据读取,gnuplot都会在当前工作目录下寻找,如果数据文件不在这。gnuplot就报数据异常!!
怎么办呢? 去百度搜索,结果。。。。。。(难道我的搜索不对,你懂得。。。。。。)
在console version中,输入命令:pwd(Print Work Directory) 输出的是 当前的工作区。也就是说:gnuplot的命令涉及到的文件,在默认情况下都是在这个目录下的。(根据在console中输入:help startup。获知,gnuplot在install的过程中,会有个配置文件生成;gnuplot每次启动都会读取配置信息,因而理论上, 所有在console中输入的命令在 配置文件中均可以使用。但一般不推荐这么做。)
我的系统是WIN7 64bit,gnuplot4.6
怎么说呢,gnuplot的工作目录在安装过程中是存在默认值的,如何修改呢? 一种方法就是 cd命令(change directory)。另外就是在gnuplot加载过程中,修改工作目录。
一般情况下(针对WIN7平台),在gnuplot的安装目录中 gnuplot/share/下有个gnuplotrc文件。这个文件的默认内容如下:
- ###
- ### Gnuplot version 4.6 intialization file
- ### This file is loaded by gnuplot at the start of each run.
- ### It is provided as a template, with all commands commented out.
- ### Uncomment and customize lines for local use.
- ### Any commands placed here will affect all users.
- ### To customize gnuplot's initial state for an individual user,
- ### place commands in a private file ~/.gnuplot instead.
- ###
- ### Language initialization
- ###
- # set locale
- # set encoding locale
- ###
- ### Default line colors and repeat cycle
- ###
- # set linetype 1 lc rgb "dark-violet" lw 1
- # set linetype 2 lc rgb "#009e73" lw 1
- # set linetype 3 lc rgb "#56b4e9" lw 1
- # set linetype 4 lc rgb "#e69f00" lw 1
- # set linetype 5 lc rgb "#f0e442" lw 1
- # set linetype 6 lc rgb "#0072b2" lw 1
- # set linetype 7 lc rgb "#e51e10" lw 1
- # set linetype 8 lc rgb "black" lw 1
- # set linetype cycle 8
- ###
- ### Initialize the default loadpath for shared gnuplot scripts and data.
- ### Please confirm that this path is correct before uncommented the line below.
- ###
- ###
- ### Some commonly used functions that are not built in
- ###
- # sinc(x) = sin(x)/x
- ###
- ### Other preferences
- ###
- # set clip two
这个文件就是 gnuplot加载过程中,读取的配置文件。
在这个文件中,有这样两行:
- ###
- ### Initialize the default loadpath for shared gnuplot scripts and data.
- ### Please confirm that this path is correct before uncommented the line below.
- ###
这句话是说,通过配置默认loadpath,添加gnuplot 脚本和数据文件的存放目录。通俗的讲,配置了这个loadpath之后,loadpath所指向的文件夹将能够被gnuplot作为工作目录。
cd "D:\\XXX\\XXX\\XXX" 注意了:目录划分符号为'\\' 。这一行命令能够实现gnuplot的工作目录。
PS :在寻找解决方法的过程中 ,参照了 google的检索结果。 也许你的系统版本,gnuplot版本和我不同,对应的初始化文件名可能不同。
gnuplot配置HOME目录的更多相关文章
- 解决 Tomcat 无法绑定 80 端口的问题,以及 Tomcat 配置虚拟目录、二级域名等
问题 今天安装完 Tomcat,安装时把 Tomcat 默认的 HTTP/1.1 Connector Port 从 8080 改为了 7080,启动 Tomcat,在浏览器中输入 Http://loc ...
- PHP学习笔记:APACHE配置虚拟目录、一个站点使用多域名配置方式
我用的是xmapp lite2016的集成包,配置虚拟目录教程如下: 找到httpd-vhosts.conf这个文件,这个文件一般是在xampp\apache\conf\extra这个路径下面,找不到 ...
- linux下通过acl配置灵活目录文件权限(可用于ftp,web服务器的用户权限控制)
linux下通过acl配置灵活目录文件权限(可用于ftp,web服务器的用户权限控制) 发表于2012//07由feng linux 本身的ugo rwx的权限,对于精确的权限控制很是力不从心的,ac ...
- apache配置网站目录的读写权限
分享下apache中配置网站目录文件权限的方法. 假设http服务器运行用户和用户组是www,网站用户为centos,网站根目录是/home/centos/web. 操作方法与步骤:1,首先,设定网站 ...
- Apache配置虚拟目录和多主机头
呃,相当古老的话题了,不过网上的资料实在是太坑爹,无奈只能自己动手做个备忘了...这里不提虚拟目录和主机头的区别了,不懂得童鞋去面壁思过吧 多个虚拟目录 首先把Apache安装到D:\Program ...
- Apache配置虚拟目录,以及各种操作
apache配置虚拟目录: 打开并创建虚拟目录的步骤如下: # Virtual hosts # Include conf/extra/httpd-vhosts.conf 去掉conf/http.con ...
- apache2.4配置虚拟目录
刚开始学习,跟着韩顺平老师的视频课件学习ing~ 这是自己在配置虚拟目录时遇到的问题以及解决办法,记录下来~ ---------------------------分割线君-------------- ...
- nginx+tomcat 配置虚拟目录。。
之前nginx作为代理.之前的location写的太绝对了..之前把动态请求全部交给tomcat,然后需要配置虚拟路径的时候,去到tomcat就被404了.得高人指点之后,配置虚拟目录的时候需要重新写 ...
- apache 配置网站目录,虚拟目录,新端口
1 配置网站目录,以ubuntu为例 1)打开apache的默认配置文件夹:cd /etc/apache2/sites-available 2)打开配置文件,本机为sudo vi 000-defau ...
随机推荐
- Windows Phone 8 开发资料
Design http://aka.ms/wp8devdesign Develop http://aka.ms/wp8devdoc Test http://aka.ms/wp8testing Publ ...
- Codeforces Round #369(div 2)
A:=w= B:=w= C:题意:有一排树,有的树已经上色,有的树没有上色,只能给没上色的树上色,一共m种颜色,不同的树上不同的色花费不同,涂完色后,连续颜色的树成为一段.对于给定的段数k,求出最小花 ...
- android之自定义广播
布局文件 点击按钮发送广播 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmln ...
- HTTP 错误 500.24 - Internal Server Error的解决方法
错误提示: 最可能的原因: system.web/identity@impersonate 设置为 true. 解决办法: 现在经典模式 连微软都几乎放弃了 原设想是为iis不断升级 提供的一种兼 ...
- Graphql介绍(Introduction to GraphQL)
Introduction to GraphQL GraphQL介绍 Learn about GraphQL, how it works, and how to use it in this seri ...
- SharePoint 2013 安装图解
转自: http://www.cnblogs.com/jianyus/archive/2013/02/01/2889653.html 介绍:文章就是SharePoint2013安装过程的图解,包括步骤 ...
- css3实现的3中loading动画效果
一.css3中animation动画各种属性详解: animation Value: [<animation-name> || <animation-duration> ...
- SPI协议及工作原理分析
说明.文章摘自:SPI协议及其工作原理分析 http://blog.csdn.net/skyflying2012/article/details/11710801 一.概述. SPI, Serial ...
- linux下截取整个网页
前提需要安装 gimp图片处理软件 打开gimp 文件-创建-从网页 然后输入网页地址就可以截取整个网页了
- yum命令安装mysql
linux下使用yum安装mysql,以及启动.登录和远程访问. 1.安装 查看有没有安装过: yum list installed mysql* rpm -qa | grep mysql* 查看有没 ...