hittore.blogg.se

Gnuplot color palette
Gnuplot color palette





Plot 'bg.dat' w image, f(x) w l lt 3 lw 2 t 'y=sin(x)*exp(-x/10)' So, in this spirit, the script above would take on the following form But this is not a real problem, for we can plot our data to a file, and then plot the file. The downside is that this works for data files only, and not with functions.

gnuplot color palette

The advantage of this method is that the plot will be just as large as the plotting area on your figure. If you do not want to tamper with the size of the rectangles, there might be a short-cut: in gnuplot 4.2 and onward, you can plot maps not only with pm3d, but with plot image. You can skip the first 7 lines, and just use the columns in your data file to show the errors. If you have a real data set that you want to plot, this should be much simpler. Since I wanted to show errorbars, I generated artificial errors with the rand(0) function. In the last part, we set the labels and the border (if you cast a glance at the code, you'll notice that these were switched off at the beginning), and plot our functions and data. Again, you might have to set the size of the plot by hand, and this might also depend on the actual terminal that you are using. In the second plot, the only thing that really is different is the colour palette, which, this time, is from some shade of red to white. In order to cover the whole canvas, we have to play with the size a bit, but this should be more or less straightforward. It will have a gradient, because we plot the function y, so as we go towards the top, the colour becomes whiter and whiter. This will be our background for the whole image.

gnuplot color palette

The interesting part begins with set multiplot: we define a palette, which will run between some shade of green and white. Now, let us see what is happening here! The first couple of lines are there just to produce some data (in this case, a damped oscillation with some random noise).







Gnuplot color palette