Discussion:
set border polar with 5.2 RC1
Christoph Bersch
2017-06-07 20:59:39 UTC
Permalink
Hi,

I'm testing a bit the new features in 5.2 RC1. I had some problems with
`set border polar`

Consider the following script:

reset
set polar
set grid polar lw 2
unset xtics
unset ytics
set size square
unset key
# set rrange [0:6.5]
set border 0 polar
plot t lt 3 lw 2, -t lt 4 lw 2

* That one doesn't plot a polar border, only when an explicit rrange is
set (uncomment the set rrange line).

* The polar border overlaps with the outer grid circle

* Another observation is, that the polar grid is not clipped at the
original square border (like it is done in 5.0), but drawn until the
canvas border.

Are those changes intended, or bugs?

Thank you,
Christoph
sfeam via gnuplot-beta
2017-06-08 04:26:57 UTC
Permalink
Post by Christoph Bersch
Hi,
I'm testing a bit the new features in 5.2 RC1. I had some problems with
`set border polar`
reset
set polar
set grid polar lw 2
unset xtics
unset ytics
set size square
unset key
# set rrange [0:6.5]
set border 0 polar
plot t lt 3 lw 2, -t lt 4 lw 2
* That one doesn't plot a polar border, only when an explicit rrange is
set (uncomment the set rrange line).
The polar border is only drawn if there is an explicit rrange (not autoscaled).
The lack of a border for auto-scaled plots now seems like a bug to me,
although from the code it apparently was intentional.
I honestly cannot remember what was the reason for that.
Post by Christoph Bersch
* The polar border overlaps with the outer grid circle
Yes. That seemed like the only well-defined place to draw it,
but I'm open to other suggestions.

I suppose there could be an entirely separate command
"set polar border at <r value>", but in general how would you
know in advance what to set it to?
Post by Christoph Bersch
* Another observation is, that the polar grid is not clipped at the
original square border (like it is done in 5.0), but drawn until the
canvas border.
That is definitely intentional. Clipping off the "corners" of a circle looks
really strange.

It would be nice if you could clip lines to RMAX instead, but the existing
clipping code is not designed for this. It's on my long-term wishlist to
find an efficient way to do radial clipping.

Ethan
Post by Christoph Bersch
Thank you,
Christoph
Christoph Bersch
2017-06-17 15:31:34 UTC
Permalink
Post by sfeam via gnuplot-beta
Post by Christoph Bersch
* That one doesn't plot a polar border, only when an explicit rrange is
set (uncomment the set rrange line).
The polar border is only drawn if there is an explicit rrange (not autoscaled).
The lack of a border for auto-scaled plots now seems like a bug to me,
although from the code it apparently was intentional.
I honestly cannot remember what was the reason for that.
I guess the reason is, that the circle with the autoscaled radius
doesn't necessarily fit into the canvas and is cut off.
Post by sfeam via gnuplot-beta
Post by Christoph Bersch
* The polar border overlaps with the outer grid circle
Yes. That seemed like the only well-defined place to draw it,
but I'm open to other suggestions.
The position is correct, but I would omit the grid circle which is at
the same radius as the polar border.
Post by sfeam via gnuplot-beta
I suppose there could be an entirely separate command
"set polar border at <r value>", but in general how would you
know in advance what to set it to?
In general, if I have a polar plot with autoscaled radius I would expect
the complete circle of radius <autoscaled r> to fit completely in the
canvas.
This seems to me like "natural" behavior and would probably also work
better together with positioning of the polar border.

Best,
Christoph
sfeam via gnuplot-beta
2017-06-17 16:09:21 UTC
Permalink
Post by Christoph Bersch
In general, if I have a polar plot with autoscaled radius I would expect
the complete circle of radius <autoscaled r> to fit completely in the
canvas.
The autoscaled maximum on r does fit within the canvas.
The problem comes because of the gnuplot default policy to
extend the axis range to the next major tic mark.
The plot comes out as you would have expected if you first say
"set auto noextend" or "set rrange [] noextend".

Exactly the same thing can happen with Cartesian coordinate plots.
The only reason you don't notice is that usually enough space is
reserved in the margins for axis labels etc that the "too large"
border is still on the screen.

For example:

set margin .01,.01, .99, .99
unset xtics
unset ytics
plot '-'
input data ('e' ends) > 0 .99
input data ('e' ends) > .99 0
input data ('e' ends) > 0 -.99
input data ('e' ends) > -.99 0
input data ('e' ends) > e
Post by Christoph Bersch
This seems to me like "natural" behavior and would probably also work
better together with positioning of the polar border.
Maybe the R axis should default to "noextend"?

Ethan
Post by Christoph Bersch
Best,
Christoph
Ethan Merritt
2017-06-17 16:48:58 UTC
Permalink
Post by sfeam via gnuplot-beta
Post by Christoph Bersch
In general, if I have a polar plot with autoscaled radius I would expect
the complete circle of radius <autoscaled r> to fit completely in the
canvas.
The autoscaled maximum on r does fit within the canvas.
The problem comes because of the gnuplot default policy to
extend the axis range to the next major tic mark.
The plot comes out as you would have expected if you first say
"set auto noextend" or "set rrange [] noextend".
Exactly the same thing can happen with Cartesian coordinate plots.
The only reason you don't notice is that usually enough space is
reserved in the margins for axis labels etc that the "too large"
border is still on the screen.
Bleah. Never mind the example.
Sent before morning coffee and it makes no sense at all.

sorry

Ethan
Post by sfeam via gnuplot-beta
set margin .01,.01, .99, .99
unset xtics
unset ytics
plot '-'
input data ('e' ends) > 0 .99
input data ('e' ends) > .99 0
input data ('e' ends) > 0 -.99
input data ('e' ends) > -.99 0
input data ('e' ends) > e
Post by Christoph Bersch
This seems to me like "natural" behavior and would probably also work
better together with positioning of the polar border.
Maybe the R axis should default to "noextend"?
Ethan
Post by Christoph Bersch
Best,
Christoph
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gnuplot-beta mailing list
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
--
Ethan A Merritt, Dept of Biochemistry
Biomolecular Structure Center, K-428 Health Sciences Bldg
MS 357742, University of Washington, Seattle 98195-7742
Loading...