|
From: theozh <th...@gm...> - 2017-06-17 13:56:06
|
as far as I understand, and it looks like that gnuplot does not allow other than screen coordinates for offset in the multiplot environment. Probably it's not clear which coordinates it should take: the first ones, the previous ones...? Anyway, you could use the gnuplot internal variables GPVAL_... "show var GPVAL" With this you need to do some "little" coordinate transformations. Maybe there is even a more elegant solution? The following code should do what you're looking for... You can actually skip all the lines starting with "print..." ### start gnuplot example code reset # enter the coordinates of the origin of the second plot # i.e. coordinates with respect to the first plot XPos = -10 YPos = 0 set multiplot # your first plot plot x print "TermSize x,y: ", GPVAL_TERM_XSIZE, ", ", GPVAL_TERM_YSIZE print "Term X: ", GPVAL_TERM_XMIN, " to ", GPVAL_TERM_XMAX print "Term Y: ", GPVAL_TERM_YMIN, " to ", GPVAL_TERM_YMAX print "Graph X: ", GPVAL_X_MIN, " to ", GPVAL_X_MAX print "Graph Y: ", GPVAL_Y_MIN, " to ", GPVAL_Y_MAX XScaling = (GPVAL_TERM_XMAX - GPVAL_TERM_XMIN)/(GPVAL_X_MAX - GPVAL_X_MIN) YScaling = (GPVAL_TERM_YMAX - GPVAL_TERM_YMIN)/(GPVAL_Y_MAX - GPVAL_Y_MIN) print "Scaling x,y: ", XScaling, YScaling XMargin = GPVAL_TERM_XMIN/XScaling YMargin = GPVAL_TERM_YMIN/YScaling print "Margin x,y: ", XMargin, YMargin XOffset = (XPos - GPVAL_X_MIN + XMargin)*XScaling/GPVAL_TERM_XSIZE YOffset = (YPos - GPVAL_Y_MIN + YMargin)*YScaling/GPVAL_TERM_YSIZE print "XOffset x,y: ", XOffset, YOffset # your second plot, for example with reduced size set size 0.4 set origin XOffset,YOffset plot x*x unset multiplot ### end gnuplot code |