gnuplot

Define font style as a variable

試著忘記壹切 提交于 2019-12-20 02:52:13
问题 Is it possible to define different font styles (in gnuplot), so that I can refer to them later by an index instead of repeating them all every time, for example: font1 = font "Helvetica,12" ; font2 = font "Verdana, 12" and so on 回答1: You can use macros for this. set macros With this enabled (in version 5 by default), you can define string variables which are replaced in a command with their content before the command is executed, like set macros Helvetica = 'font "Helvetica, 12"' Verdana =

gnuplot for loop with interval

流过昼夜 提交于 2019-12-20 02:14:18
问题 I have the following gnuplot script that uses a for loop to plot 100 data sets of (x,y) format to one plot. However, the script only plots 2 data sets. Can anybody help? Thank you. plotfile = "graph.eps" set output plotfile filename(n) = sprintf("%d_mod.int", n) plot for [i = 400000:4000000:400000] filename(i) u 1:2 title sprintf("%d", i) w lp 回答1: That is a bug, which will be fixed in 4.6.6 and 5.0, see #1429 Erratic behaviour of do for loops . As a workaround you must iterate over smaller

Gnuplot symbols in epslatex terminal with dots inside

旧街凉风 提交于 2019-12-20 02:08:39
问题 When creating symbols in combination with the epslatex terminal in Gnuplot 4.6, I always notice that in the center of the symbol a small dot is shown (clearly visible on zoom-in). This annoys me quite a bit, as it does not happen in, for example, the png terminal of Gnuplot. Is there a simple method in Gnuplot to get rid of this dot? Minimum reproductive example: set terminal epslatex set output "test.tex" test It can be directly observed in the outputfile test.eps . Additional info: I use

vary point color based on column value for multiple data blocks gnuplot

守給你的承諾、 提交于 2019-12-20 01:40:32
问题 My question is very similar to this one, from which I was able to learn a lot. However, I am working with multiple data blocks, like this: 1 2 3 4 5 6 7 8 0 4 3 0 4 5 7 2 3 0 4 5 0 5 6 7 and I am plotting them like this: plot "file.txt" index 0 u 1:2 w points pt 1,\ "file.txt" index 1 u 1:2 w points pt 2 which creates 2 different sets of points, each a different color. Now, my goal is to modify this script so that if the 3rd data column is 0, the color of the point will become black. I would

Adding a string to a gnuplot autotitle

爱⌒轻易说出口 提交于 2019-12-20 01:10:24
问题 I am using the gnuplot scrip command set key autotitle columnhead to make the lables for my data. The only issue is, the column head data is numeric and so it doesnt really mean much on its own. Is there a way to add a fixed string to the autotitle, eg "Year " + columnhead , or alternatively, give my key a title? 回答1: String concatenation using . operator with columnhead() works in gnuplot v4.6 (documentation): set terminal pngcairo enhanced truecolor size 480,320 fontscale 0.8 set output

程序员实用工具,推荐一款代码统计神器GitStats

落爺英雄遲暮 提交于 2019-12-20 01:00:23
阅读全文需7分钟,工具很实用。 1. 前言 对于Git项目开发,有一些可视化的工具,如gitk,giggle等,来查看项目的开发历史。但对于大型的项目,这些简单的可视化工具远远不足以了解项目完整的开发历史,一些定量的统计数据(如每日提交量,行数等)更能反映项目的开发进程和活跃性。今天给大家推荐的这款工具: GitStats ,它能生成如下的一些统计数据,并且可以图表形式进行展示对比。 2. 进一步了解Gitstats 进一步来讲,Gitstats它是一个git仓库分析软件,它可以检查仓库并生成历史数据的统计信息。可以帮助你查看git仓库的提交状态,根据不同维度分析计算,并自动生成数据图表。 官网介绍: http://gitstats.sourceforge.net/ 当前GitStats所生成统计信息常用分为如下几类: 常规的统计: 文件总数,行数,提交量,作者数。 活跃性: 每天中每小时的、每周中每天的、每周中每小时的、每年中每月的、每年的提交量。 作者数: 列举所有的作者(提交数,第一次提交日期,最近一次的提交日期),并按月和年来划分。 文件数 :按日期划分,按扩展名名划分。 行数: 按日期划分。 3. 命令行安装 安装使用非常简单,如果是ubuntu,直接apt-get 即可,下面介绍几款不同操作系统下的安装方式。 Ubuntu: apt-get install

Is there a easy way to get points with black outline in gnuplot?

做~自己de王妃 提交于 2019-12-19 19:58:10
问题 Is there a easy way to get points with black outline in gnuplot? I'm using standard color filled point types, for example: set style line 3 lc rgb '#4682B4' pt 9 ps 0.65 but I need to make sure that the plot will be easily readable in black & white version too. Black outlines would help, how can I add them? 回答1: The simplest "quick and dirty" solution that comes to mind is to plot the data set twice, once with the full symbol style and then with an empty symbol style. For instance: plot "temp

Display powers of 2 on the axis with gnuplot

旧街凉风 提交于 2019-12-19 18:29:33
问题 I am trying to use gnuplot to plot results from my experiments. I wrote a C++ program that generates a datafile that looks like this: 10 3.5 11 3.5 12 3.5 13 3.6 What I am trying to do is to display the values of the first column of this datafile on the x-axis as powers of 2. It would look something like that (It doesn't have to look exactly the same): http://i.stack.imgur.com/8BSLr.png So with the datafile I posted, I want to have 2^10, 2^11, etc on the x axis. Any idea how to do that? I can

gnuplot error: Bad format character

纵饮孤独 提交于 2019-12-19 10:11:40
问题 Am new to gnuplot but need o use it urgently. This is the following set of commands I used: set terminal latex set output “conflict.tex” set xtics ("random" 2, "sharing(0%)" 3, "sharing(10%)" 4, "sharing(25%)" 5, “sharing(50%)” 6, “stat” 7) set ylabel “Conflict Percentage” set xrange [0:9] set yrange [0:60] set xlabel “Traces” set boxwidth 0.3 set style fill plot 'D:\Utility Softwares\conflicts.dat' with boxes after which i get "Bad format character" and don't know why Thanks for help 回答1:

How to add a greek character in png file created by gnuplot

走远了吗. 提交于 2019-12-19 10:02:06
问题 I am using a commercial sever with FreeBSD system without root account. I install gnuplot with my account. But, I can not set up fonts. So, I copy the fonts files in my home directory such as ~/usr/fonts Then, I use followed scripts in my gnuplot files: set term png enhanced font '/home/Tom/usr/fonts/truetype/msttcorefonts/verdana.ttf' set out 'xrd.png' set xlabel '2 {/Symbol q}'; set ylabel 'Count'; set xrange [:]; set yrange [:]; unset key; set border lw 1; plot './data.txt' using 1:2 with