|
|
Odd behavior with 'set margin' for negative values
Hello,
I'm getting some odd results when using a negative value for a 'set
margin' command. This causes the value of the margin to get set to
'screen -1'. See the example below. I know this seems like an odd
thing to do but I use the postscript terminal and like to use the
margins for extra space. I think the current behavior isn't
consistent with the documentation. In the entry for 'help set margin'
it says:
A negative value (or none) causes `gnuplot` to revert to the
computed value.
It would be great if negative values were allowed when using the 'at
screen' option. A negative value without the screen option (e.g. set
bmargin -1) or just 'unset bmargin' could still be used for reverting
to the computed value.
I've tested this with the latest CVS version on x86_64.
% cat test.gnu
set lmargin screen -0.01
set rmargin screen 1.01
set bmargin screen -0.01
set tmargin screen 1.01
plot x
pause -1
show margin
% gnuplot test.gnu
lmargin is set to screen -1
bmargin is set to screen -1
rmargin is set to screen 1.01
tmargin is set to screen 1.01
%
|
|
0
|
|
|
|
Reply
|
darby.vicker (1)
|
12/3/2009 8:28:25 PM |
|
Darby wrote:
> Hello,
>
> I'm getting some odd results when using a negative value for a 'set
> margin' command. This causes the value of the margin to get set to
> 'screen -1'. See the example below.
That does indeed seem to be a bug.
Thanks for the report.
> I know this seems like an odd
> thing to do but I use the postscript terminal and like to use the
> margins for extra space. I think the current behavior isn't
> consistent with the documentation. In the entry for 'help set margin'
> it says:
>
> A negative value (or none) causes `gnuplot` to revert to the
> computed value.
>
> It would be great if negative values were allowed when using the 'at
> screen' option.
Screen coordinates run from 0 to 1. Values outside that range have no
meaning. They are, by definition, "off the screen". The result of
trying to draw off the screen ranges from relatively harmless (PostScript)
to immediately fatal (several bitmapped terminals for which this means
writing outside of allocated memory). I hope that we have managed to
fix all places in the code that result in writing off-screen, although
it wouldn't surprise me terribly if we had missed a few.
For exactly this reason, most of the current terminals enforce clipping
of all elements to the screen boundaries. A few terminals, in particular
postscript, have been exempted so far because old scripts counted on
this behaviour. Nevertheless it is strongly discouraged, if only because
your plot commands won't work if you try to switch to another terminal
type.
Ethan
> A negative value without the screen option (e.g. set
> bmargin -1) or just 'unset bmargin' could still be used for reverting
> to the computed value.
>
> I've tested this with the latest CVS version on x86_64.
>
> % cat test.gnu
> set lmargin screen -0.01
> set rmargin screen 1.01
> set bmargin screen -0.01
> set tmargin screen 1.01
>
> plot x
> pause -1
>
> show margin
> % gnuplot test.gnu
>
> lmargin is set to screen -1
> bmargin is set to screen -1
> rmargin is set to screen 1.01
> tmargin is set to screen 1.01
> %
|
|
0
|
|
|
|
Reply
|
sfeam
|
12/4/2009 12:18:08 AM
|
|
|
1 Replies
245 Views
(page loaded in 0.073 seconds)
Similiar Articles: glDrawPixel - what is missing here? - comp.graphics.api.opengl ...(so if it were glDrawPixels I would set the ... In the glBitmap example, the x and y values can be negative and that ... For some strange reason it always is ... hpgcc integration program - comp.sys.hp48... is not achieved, then the returned error is negative. ... Others may want to set a default value in ITOL in the ... That way a user could have different variable values in ... Nonlinear curve fit fails to converge - comp.soft-sys.matlab ...Good starting values improve the behavior. Use of a tool like a ... curvature over part of the curve, and negative ... system, but they can also predict some strange ... code speed moving from fortran 77 compiler to f2003 compiler ...... and that is allocating REAL*8 on odd four ... That offset pointer can be positive or negative ! ... have options that allow memory to be set by default to particular values. Use of MATLAB fftshift - comp.dsp... is a tweak depending if the array length is odd or ... namely x(n0+1:n0+N/2), to the "negative time" half of the ... with the origins (just like "size" returns the values set ... Converting number to std::string ("itoa()" ) - comp.lang.c++ ...Only for the ten digits in the basic character set. ... note all the things that are missing as well as the odd ... (Because of its defined behavior in case of errors.) |> Or ... Conrad DCF receiver - comp.protocols.time.ntp... the time -- important for speeding my boot where I set ... is that real receivers have both positive and negative ... or CHF) with typical gains of 200-ish, allowing a margin ... Neatest way to get the end pointer? - comp.lang.cAnd you invoke undefined behavior. > It's a hell of a ... and N as your variable names, even if you set them ... quote seems only to apply to the case of non-negative values. [comp.publish.cdrom] CD-Recordable FAQ, Part 1/4 - comp.publish ...Archive-name: cdrom/cd-recordable/part1 Posting-Frequency: monthly Last-modified: 2008/10/09 Version: 2.71 Send corrections and updates to And... How to get envelope from AM signal without phase shift - comp.dsp ...If your HT contains an odd number of taps, the signal ... varies from some peak positive value to a peak negative ... antennae >5) Do not know or understand how to set up a ... Margins (Cascading Style Sheets: The Definitive Guide) - MIK telecomThis collapsing behavior only applies to margins. ... it's possible to set negative values for margins. ... becomes a little odd. First, realize that the margins set for ... The Definitive Guide to Using Negative Margins | Smashing Coding... says that, “Negative values for margin ... understood the behavior of “position:relative”. It annoys me until I discovered negative margins ... to my CSS skill set. 7/30/2012 10:54:48 AM
|
|
|
|
|
|
|
|
|