forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Native %pl - Bug #101 (Minor) - Axis Captions Positioning
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Thu Sep 13, 2018 9:49 pm    Post subject: Native %pl - Bug #101 (Minor) - Axis Captions Positioning Reply with quote

Native %pl - Bug #101 (Minor) - Axis Captions Positioning ... Strategy Not Robust

So, here we go then ... one at a time as requested....
In previous posts the question of axis captions being placed centred on the +ve prt of an axis has been raised.

At one point in reply Paul you wrote to the effect that 'that's the way most people would want it'.
(the precise post where you wrote that escapes me for the moment but
I'll post it here when I next come across it !)

Your statement is partly true, if given the caveat .... " providing all the data to be plotted is positive !"

So, I've taken Dan's short code in the post:
http://forums.silverfrost.com/viewtopic.php?t=3487&postdays=0&postorder=asc&start=360
and slightly modified it to give the exception that breaks the rule ....

Here's the test code, based on Dan's 'Beautified Version' ....

Code:
!       v 2b1a2
   use clrwin
   parameter (N=5)
   real*8 X(N), Y(N)
   Data X/1e1, 1e2, 1e3,  1e4, 1e5/
   Data Y/-2.2, -66, -8333, -1111, -777/
   i=winio@('%sf%ts%bf%es&', 2d0)
   call winop@("%pl[axes_pen=3,width=3,x_axis='X Axis Title',y_axis='Y Axis Title']")
   i=winio@('%ww%pv%pl[native,framed,x_array,scale=linear,N_GRAPHS=1]', 625,500, n, X, Y)
   end


And here's what it produces ....


So, it can be clearly seen why the default for placement of the y-axis caption needs to be in the centre of the overall y-axis.

The same should obviously apply to the x-axis caption when all or the majority of x-axis values are negative !

Advanced Considerations
In the case where ticks&labels (and hence captions) are placed on the outside of the frame (via option [frame]) the central caption strategy would always work.

HOWEVER (isn't there always at least one !), for the default case where 'axes are axes' as it were ...

Applying globally a 'centralised caption' strategy, when both axes have both +ve and -ve values the captions on one axis would 'cross' the other axis (and it's labels).
So clearly for the general case, some level of 'intelligent selection' of the captions locations is appropriate.
Maybe, by comparing the captions' strings lengths with the lengths of the +ve and -ve range axes lengths and then selecting the appropriate one along which to place the caption ?

Note : way back on the 4th-5th May 2017 myself and Ken Smith made some comments about the need for better captions positioning here: http://forums.silverfrost.com/viewtopic.php?t=3487&postdays=0&postorder=asc&start=30
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Fri Sep 14, 2018 7:36 am    Post subject: Reply with quote

Thanks John. I will take a look at this when I can and then get back to you for the next one.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Mon Oct 01, 2018 12:53 am    Post subject: Reply with quote

Any sign of progress on this one Paul ?
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Mon Oct 01, 2018 7:38 am    Post subject: Reply with quote

I will post a message immediately after it is fixed.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Mon Oct 01, 2018 2:39 pm    Post subject: Reply with quote

Iappreciate your committment to the cause Paul, even though it's a bit ....


Maybe I chose too difficult a problem to decypher this one. As you're struggling to release resources to struggle with this bug I'll post another simpler one so you have a choice of two and a chance of getting the ball rolling.
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Oct 01, 2018 2:47 pm    Post subject: Reply with quote

Well, J-S, I've read some tosh in my time, but this doesn't seem to have been authored by anyone on the Fortran Committee. Is it a case of someone using %pl to draw photographs? I think we should be told.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Mon Oct 01, 2018 3:25 pm    Post subject: Reply with quote

John

Your sample is fine. I will get to it when I can.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Mon Oct 01, 2018 4:54 pm    Post subject: Reply with quote

Eddie,
it's a cryptic example of 'statin' the bleedin' obvious'.
which I thought was the best description of Paul's comment Smile
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Tue Nov 06, 2018 6:43 pm    Post subject: Reply with quote

Bearing in mind that another 4 weeks have flown by with no treatment of this (which is only the first of many niggly bugs which are lined up to be marched into the SF Ark 'one-by-one') ... that's 7 weeks total now for what should be something very simple to fix ... Can I assume that 'development' of %pl, and hence fixation of all related bugs, is now a dead duck in the water ???
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Tue Nov 06, 2018 7:57 pm    Post subject: Reply with quote

No. It's nearing the top of the list and not forgotten.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Wed Nov 07, 2018 4:58 pm    Post subject: Reply with quote

This particular problem with the position of the Y caption has now been fixed for the next release of the DLLs.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Thu Nov 08, 2018 1:30 am    Post subject: Reply with quote

Thank You Paul.
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Thu Nov 08, 2018 8:26 am    Post subject: Reply with quote

Quote:
The same should obviously apply to the x-axis caption when all or the majority of x-axis values are negative !


Paul, did you fix the same for the x-axis caption ? (you only mention the Y)
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Thu Nov 08, 2018 9:22 am    Post subject: Reply with quote

The bug was in the rounding process and became apparent when it was used to calculate the minimum value of y in this particular sample. The same rounding process is used for all the max and min values so the fix will hopefully make things better all round (i.e. when the programmer does not provide max and min values).

If there are other issues then I will wait till they are reported.
Back to top
View user's profile Send private message AIM Address
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Sat Nov 10, 2018 12:09 am    Post subject: Reply with quote

interesting. I can't for the life of me think why a 'rounding process ' would affect the positioning of the axis caprtion.
Since it's positioned (way) too far up that must mean the 'rounding' was phenomenal (relaive to the actual -8000 minimum)

I guess we'll just have to wait and see what impact your change has made.

I'll dig out number 2 bug.
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group