![]() ![]() We have to tell Gnuplot to map the data on a sphere and using angle values in degree. The 3D plot needs a little more settings. Set lmargin screen 0 set bmargin screen 0 set rmargin screen 1 set tmargin screen 1 set style line 2 lc rgb '#c0c0c0' lt 1 lw 2 unset border Therefore we first add a gray line style, unset the border and arrange the figure margins. We can also easily draw a whole globe in 3D from the given data. 2 The 2D plot of the world edited with Inkscape This and a solution to convert the lines to dashed versions is also mentioned in the plotting the world entry.įig. Especially the dashed line of the grid is not created in the right way, even though the dashed option is used for the terminal. The last thing I would like to mention is the problem, that the output of the svg terminal is slightly different from the pngcairo terminal. 1 and why we should do this:ġ) change the default colors to more pleasant ones and make the lines a little bit thicker set style line 1 lc rgb '#8b1a0e' pt 1 ps 1 lt 1 lw 2 # - red set style line 2 lc rgb '#5e9c36' pt 6 ps 1 lt 1 lw 2 # - greenĢ) put the border more to the background by applying it only on the left and bottom part and put it and the tics in gray set style line 11 lc rgb '#808080' lt 1 set border 3 back ls 11 set tics nomirrorģ) add a slight grid to make it easier to follow the exact position of the curves set style line 12 lc rgb '#808080' lt 0 lw 1 set grid back ls 12 In the following I will have a look at the things we have to do to reach Fig. 2 Default output of the pngcairo terminal ( code to produce this figure, data) If you want to see an overview, look at my gnuplot configuration snippets and at the collection of palettes and line colors.įig. The set loadpath command tells gnuplot the directory where it can find all the configuration snippets. The same can be done for adding a grid, the right line color definitions and the extra Bessel functions leading to the following excerpt from the main plotting file: In the main plotting file I then just have to load the setting I like to have and I’m done. Set style line 101 lc rgb '#808080' lt 1 lw 1 ![]() Here, I have four different config files, called xyborder.cfg, xborder, yborder.cfg, noborder.cfg, which do exactly what their names would suggest. All of those could be easily stored in small config files and reused in other plots.Īs an example I will start with the axes. 1, it is a 2D plot, including axes, a grid, line colors, and definitions of higher order Bessel functions. Let us start with the Bessel function example from the last blog entry. ( code to produce this figure, dark2.pal, xyborder.cfg, grid.cfg, mathematics.cfg) 1 Bessel functions from order zero up to six plotted with the dark2 line colors. Tags: circle, colormap, dgrid3d, grid, imageįig. Set label 'very dense' at 0.3,-0.3 center front tc ls 1 Set label 'dense' at 0.5,0.75 center front tc ls 1 Set label 'normal' at -1,0.2 center front tc ls 1 R = 1.49 # make radius smaller to exclude interpolated edge points The result is then the nice circular heat map in Fig. ![]() The manually added points like xmin are removed by a smaller radius value. Plot "tmp.txt" u 1:2:(circle($1,$2,$3)) w imageįinally a few labels and the original measurement points are added. In order to limit the heat map to a circle you first extrapolate the grid using dgrid3d and store the data in a new file.Īfterwards a function is defined in order to limit the points to the inner of the circle and plot the data from the temporary file.Ĭircle(x,y,z) = sqrt(x**2+y**2)>r ? NaN : z 3 Sand density measured at different positions in a circular container ( code to produce this figure, sand.pal, data) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |