gnuplot

Gnuplot how to lower the number of tics in x axis

那年仲夏 提交于 2019-12-18 08:25:05
问题 The figure has too many xtics and ytics. Can I have half of them? I know I can manually set tics in a way similar to this: set xtics (1,2,4,8,16,32,64,128,256,512,1024) But I feel it is not a general solution. You can not manually set tics for all figures. I have loads of them and the gnuplot code is automatically generated using Java. Here is the code for the figure: https://dl.dropboxusercontent.com/u/45318932/gnuplot2.plt Can you help lower down the number of x and y tics? 回答1: There is no

Gnuplot: plotting the maximum of two files

时间秒杀一切 提交于 2019-12-18 07:09:47
问题 let's assume I have two files formatted like this: x --- y 0 --- 2 1 --- 2.4 2 --- 3.6 which differ for the values of y. is there a way to plot a single graph that is, for every x, the maximum value of y between the two files? Dunno if explained my self sufficiently well. I was trying with conditional sentences but I couldn't find any expression that let me search in 2 different files 回答1: There is no way to combine two files or more in a single plot with gnuplot only. You must use an

How to mark some points on 2D heat map in gnuplot?

蓝咒 提交于 2019-12-18 07:09:36
问题 I am using simple scheme for plot 2D heat map from my data like this: set pm3d map set pm3d interpolation 5,5 splot "file" Now i need to mark few points on this data, maybe with white color. I tried to do: splot "file"; plot "points" and it's not working and writes: "Can't use pm3d for 2d plots". 回答1: What does the file look like? You can do: splot 'file' with pm3d, 'points' with points linecolor rgb "white" depending on what 'points' looks like though, you might need to add a using

GNUPlot disappears immediately after its creation

徘徊边缘 提交于 2019-12-18 06:56:28
问题 I have created the gnuplot , but the problem is that it disappears immediately. I tried different solutions proposed in other threads, but none of them worked. Solution 1: comment the line bf.append("quit").append(NL); in the file GNUPlotParameters.java . Solution 2: put the line gp.setPersist(true); before gp.plot(); . DataSetPlot plotdata = new DataSetPlot(Xvals); plotdata.setTitle(""); GNUPlot gp = new GNUPlot("C:\\Program Files (x86)\\gnuplot\\bin\\pgnuplot.exe"); gp.addPlot(plotdata); gp

gnuplot: how to set custom non linear scales

雨燕双飞 提交于 2019-12-18 06:36:13
问题 is there any possibility for using non linear scales with self defined break of slope points? For example: i want the half of the y-scale shows the range [0:1] and the other half [1:5] and i do not want to use logarithmic scale. The best thing would be the possibility to provide a mapping function. Sure one could directly map the function results but then the labes will not fit to the actual data. Is there any possiblilty? I searched a bit but iam not sure if i missed something or if it is

gnuplot: how to set custom non linear scales

别说谁变了你拦得住时间么 提交于 2019-12-18 06:36:10
问题 is there any possibility for using non linear scales with self defined break of slope points? For example: i want the half of the y-scale shows the range [0:1] and the other half [1:5] and i do not want to use logarithmic scale. The best thing would be the possibility to provide a mapping function. Sure one could directly map the function results but then the labes will not fit to the actual data. Is there any possiblilty? I searched a bit but iam not sure if i missed something or if it is

How to produce dashed lines in gnuplot 5 using TikZ terminal?

不羁的心 提交于 2019-12-18 06:06:09
问题 I have recently upgraded to gnuplot 5 and have been unable to produce dashed lines using the TikZ terminal. Running these commands: set term tikz set output "test.tex" test produce dashed line types in gnuplot 4.6 (first image), but only solid ones in gnuplot 5 (second image). Is there a way to fix this without downgrading? I have tried setting different values for the dashlength terminal option, but that didn't help. 回答1: With 5.0 gnuplot has changed its way to deal with dashed lines. All

Show graph on display and save it to file simultaneously in gnuplot

旧时模样 提交于 2019-12-18 05:56:39
问题 How can I save graph in to file and also print it to display? I've tried: #!/usr/bin/gnuplot -p date=system("date +%F_%T | sed 's/:/-/g'") set term png set output date.".png" set term x11 set out plot sin(x) PS: Is there a possibility to save the graph which is displayed in gnuplot window? I've noticed that there is copy to clipboard button but no save. 回答1: If you want to send a plot both to a file and to an interactive terminal like x11 or wxt you have the replot after you changed the

gnuplot angstrom label with Times-Roman font

你说的曾经没有我的故事 提交于 2019-12-18 04:24:07
问题 I'm trying to produce a plot where I have the character Å (angstroms) in the x axis. Moreover, I want this character to be in the same font as the rest of the graph, that is I want to use Times-Roman. If I use the following code: set encoding iso_8859_1 set term postscript eps enhanced color "Times-Roman, 32" set output "angstroms.eps" set xlabel "Try1 {A} ({\305})" plot sin(x) I obtain this figure: (note: the figure I get is in eps format, but I have to upload a jpg to stackoverflow) If I

disturbing artifacts in pdf

纵然是瞬间 提交于 2019-12-18 04:22:00
问题 I'm struggling with a problem when making plots with filledcurves. Between the filled areas, there seems to be a "gap". However, these artifacts do not appear on the print, but depend on the viewer and zoom-options. In Gnuplot I use the eps terminal, the eps-files look great, but the lines appear when I'm converting to pdf. The conversion it either done directly after plotting or when converting the latex-document from dvi to pdf. As most of the documents are here on the display nowadays,