|
From: Martin W. <ma...@gk...> - 2016-04-21 09:12:52
|
I am plotting some 2D data (a heatmap) which needs to be "pixel perfect" and include a colorbox. I want no margins, so I use "set lmargin 0" etc. I can then set the terminal size to the exact size of the plot, with an extra margin for the colorbox. But the top and bottom numbers in the colorbox are clipped. I need to shrink the colorbox, so that it is not clipped, but get it to be placed to the right of the plot. I can only change the size and origin of the colorbox using the "user" option: which also causes plot to be expanded to the full width of the image, with the colorbox placed on top of it. This plot file illustrates the problem: ################### gnuplot example ##################### set lmargin 0 set rmargin 0 set tmargin 0 set bmargin 0 set terminal png size 318,256 set out 'out.png' # By default, the box is to the right of the plot # but the numbers are clipped top and bottom. # # If we uncomment this line, the box moves over the plot # and is clipped on the right. The plot is wider: #set colorbox user # If we uncomment this line, the box is smaller and not clipped, # but is still over the plot, and the plot is wider: #set colorbox user size 0.05,0.8 origin 0.8,0.1 plot[0:1][0:1] '-' u 1:2:3 with image 0 0 0 0 1 1 1 0 2 1 1 3 e ################# end of example ###################### -- Martin Dr Martin Ward STRL Principal Lecturer & Reader in Software Engineering ma...@gk... http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4 G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/ Mirrors: http://www.gkc.org.uk and http://www.gkc.org.uk/gkc |