![]() (Blue was the label colour of x.) After plotting the curves, we unset the grid, and we also take off the labels and ticlabels. Next, we set the various ranges, and then set up the first grid line, which will be drawn at every xtics, and in blue. Of course, we could do this with arrows, but since we want to have coloured grids, it is better to do it in this way. Note that when doing so, we assign a colour to each axis, so that we will know which axis the plot belongs to. Set grid x2tics lt 0 lw 1 lc rgb "#000000"įirst, we define a couple of constants, and then set up the axis labels. Set grid xtics lt 0 lw 1 lc rgb "#0000ff" Set xlabel 'Wavelength ' tc rgb "#0000ff" It is a vicious way to deceive gnuplot, but it does the trick. Of course, we don't actually want to plot anything after the first one, therefore, we will just plot 1/0. The way out of this difficulty is to trick gnuplot into thinking that we have more than one plot, and re-set the grid before each new plot. Then gnuplot would place the grid lines at y2tics all right, but the grid lines at ytics would also be green, and this is not what we want. Set grid y2tics lt 0 lw 1 lc rgb "#008800" The problem is that when you issue this command multiple times, for some funny reason, only the last colour setting will take effect, i.e., if after the line above, you happened to have Set grid ytics lt 0 lw 1 lc rgb "#880000"įirst, we define where we want to have the grid (everywhere, where there is an ytics), then the linetype, the line width, perhaps, and the colour. ![]() ![]() ![]() The standard way of defining a grid is a line similar to this: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |