View previous topic :: View next topic |
Author |
Message |
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Thu Sep 13, 2018 9:49 pm Post subject: Native %pl - Bug #101 (Minor) - Axis Captions Positioning |
|
|
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 ... " |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Fri Sep 14, 2018 7:36 am Post subject: |
|
|
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 |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Mon Oct 01, 2018 12:53 am Post subject: |
|
|
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 ... " |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Mon Oct 01, 2018 7:38 am Post subject: |
|
|
I will post a message immediately after it is fixed. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Mon Oct 01, 2018 2:39 pm Post subject: |
|
|
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 ... " |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2390 Location: Yateley, Hants, UK
|
Posted: Mon Oct 01, 2018 2:47 pm Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Mon Oct 01, 2018 3:25 pm Post subject: |
|
|
John
Your sample is fine. I will get to it when I can. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Mon Oct 01, 2018 4:54 pm Post subject: |
|
|
Eddie,
it's a cryptic example of 'statin' the bleedin' obvious'.
which I thought was the best description of Paul's comment _________________ ''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 ... " |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Tue Nov 06, 2018 6:43 pm Post subject: |
|
|
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 ... " |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Tue Nov 06, 2018 7:57 pm Post subject: |
|
|
No. It's nearing the top of the list and not forgotten. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Wed Nov 07, 2018 4:58 pm Post subject: |
|
|
This particular problem with the position of the Y caption has now been fixed for the next release of the DLLs. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Thu Nov 08, 2018 1:30 am Post subject: |
|
|
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 ... " |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Thu Nov 08, 2018 8:26 am Post subject: |
|
|
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 ... " |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Thu Nov 08, 2018 9:22 am Post subject: |
|
|
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 |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Sat Nov 10, 2018 12:09 am Post subject: |
|
|
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 ... " |
|
Back to top |
|
|
|