set border polar with 5.2 RC1

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

set border polar with 5.2 RC1

Christoph Bersch
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

------------------------------------------------------------------------------
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
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: set border polar with 5.2 RC1

Gnuplot - Dev mailing list
On Wednesday, 07 June 2017 10:59:39 PM Christoph Bersch wrote:

> 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 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.

> * 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?

> * 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

> Thank you,
> 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
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: set border polar with 5.2 RC1

Christoph Bersch
On 08.06.2017 06:26, sfeam wrote:
> On Wednesday, 07 June 2017 10:59:39 PM Christoph Bersch wrote:
>>
>> * 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.

>> * 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.

> 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

------------------------------------------------------------------------------
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
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: set border polar with 5.2 RC1

Gnuplot - Dev mailing list
On Saturday, 17 June 2017 17:31:34 Christoph Bersch wrote:
>
> 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


> 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

 
> 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
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: set border polar with 5.2 RC1

Ethan Merritt
On Saturday, 17 June 2017 09:09:21 sfeam via gnuplot-beta wrote:

> On Saturday, 17 June 2017 17:31:34 Christoph Bersch wrote:
> >
> > 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:

Bleah. Never mind the example.
Sent before morning coffee and it makes no sense at all.

        sorry

                Ethan

>
>    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
>
>
> > 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
>
>  
> > 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
> [hidden email]
> 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

------------------------------------------------------------------------------
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
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Loading...