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
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


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

PostPosted: Sat Apr 01, 2017 8:03 pm    Post subject: Reply with quote

Perhaps I am misunderstanding. GET_PLOT_POINT@(0.0d0,0.0d0,xp,yp) gives the origin for the axes. You also know the (x,y) values for a given tick mark so you can get the corresponding pixel co-ordinates.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Sun Apr 02, 2017 1:28 am    Post subject: Reply with quote

Can we get pixel (or actual plotted X,Y) coordinates of the mouse like with usual %gr?
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Sun Apr 02, 2017 5:20 am    Post subject: Reply with quote

Paul, I think the misunderstanding is when I use the word graph.
I say this after reading references to graph in the new documentation for native %PL.
For me a graph is the complete graphic (axes, axes labels, title, grids, and of course curves plotted),

I think maybe you're interpreting it as 'curve' (in my terminology).

What you suggest above I can see is fine for putting labels on individual plotted points on a curve (at maximum values for example) but I was wondering about changing the labels on the x,y axes (the auto generation of which can be supressed to allow the user to write their own (thus allowing for example mixed font labels - say typically to include greek symbols for quantities)or even change typeface for different words)

Also, my second point/example was related to the fact that legends as demonstrated in examples in the documentation appear to be uniquely internal to the axes becasue I suppose the plot area is auto-maximised to fill the %gr window, hence there is no significant 'margin' around the plot in which to put them for example?

This is why I said:
Quote:
I think it's one of those things for the future development phase
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sun Apr 02, 2017 8:18 am    Post subject: Reply with quote

Dan

The native %pl uses a %gr region so you should be able get the mouse position in the same way. If not then please post a sample to show how it would be coded.

John

There is now an option (probably only in the next release) to set the margin so I am hoping that this will mean that you will be able to do what you want.
Back to top
View user's profile Send private message AIM Address
John-Silver



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

PostPosted: Sun Apr 02, 2017 10:55 am    Post subject: Reply with quote

Thanks Paul,
that does indeed sound promising, I'll look forward to seeing it.
It will mean that effectively one can then programme user-defined any axes titles, main titles, legends, etc ..... first, calculate the margins required and then define the graphic area as a function of that.

Note for future development reference the goal should be user-defined marginS (plural) ! Ther'eìs a need to be able to specify all 4, top/bot/left/right to allow positioning of legends (or any other text for that matter) on any side . If a single 'width' of margin only is foreseen then it would ean large 'wasted' areas on the oother 3 sides.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Thu Apr 06, 2017 12:09 am    Post subject: Re: Reply with quote

PaulLaidler wrote:

Naturally it can't handle log y for negative y and to switch to a linear scale seems reasonable to me. Negative values of log y are more difficult to handle because the automatic y min can get very large but we can look into that.


If zero and negative numbers appear in the dataset and there exist restriction cutting off all the data below specific threshold like that

call winop@('%pl[Y_MIN=1.e0]')

then the native %PL should not switch from log to linear scale. Right now it sometimes switches to linear scale without any reason
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Apr 06, 2017 8:14 am    Post subject: Reply with quote

Thanks Dan. When the next release comes out, if it is still wrong, perhaps you could send me an illustrative example.

%pl now does the log transformation of the raw data so it is bound to reject zero and negative values in the raw data. The next release is designed to allow zero and negative values in the transformed data.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Thu Apr 06, 2017 11:34 pm    Post subject: Reply with quote

Sounds good. Curious though how did you implement acceptance of zero values without mentioned above y_min=Val ? By allowing many additional orders of magnitude ?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Apr 07, 2017 7:32 am    Post subject: Reply with quote

I think that is what it amounts to. We will see what the end result is.
Back to top
View user's profile Send private message AIM Address
John-Silver



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

PostPosted: Fri Apr 07, 2017 7:45 am    Post subject: Reply with quote

Quote:
%pl now does the log transformation of the raw data so it is bound to reject zero and negative values in the raw data. The next release is designed to allow zero and negative values in the transformed data


I'd be interested to see how you can get 've values in the transformed data !!! since Log10(+ve no) is always +ve !!!!
Am I missing something in the discussion ?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Apr 07, 2017 7:52 am    Post subject: Reply with quote

log10(1e-3) = -3
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Fri Apr 07, 2017 10:18 am    Post subject: Reply with quote

John,
The problem is when the argument of LOG becomes a very small number or worse zero because the log10(0)=-inf. To plot such data in the LOG scale the %pl switches from LOG to LINEAR scale. My offer was not to switch on linear scale if condition is set in %pl not to plot anything below Y_min.

The way how to handle this could be to crash the code but that's bad idea. Another way is that %pl will still plot this very small or zero number as very small number (smaller then anything else on the graph by say 10-20 orders of magnitude). The user will immediately notice this huge drop and will somehow fix the problem with plotted data. I think Simpleplot was sometimes doing that, sometimes crashed. But Simpleplot also had the feature i mentioned above, so that if you explicitly tell it not to plot anything below some Y_min it plotted small data numbers as Y_min
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Fri Apr 07, 2017 6:34 pm    Post subject: Reply with quote

OK, I think I've slowly caught up.
I personally think that changing to a linear scale is not a good choice.
A better option would be to simply not plot the points below a certain level, or to plot them 'flat' at that threshold level (maybe highlighting in colour.
The graphs will look very odd with mixed scales !
I still have difficulty in seeing what data could possibly fall into this category, although there surely are obviously in the scientific world.
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Fri Apr 07, 2017 7:03 pm    Post subject: Reply with quote

things will become clearer once I get time to run some examples ! (I think Smile unless Mr. Murphy makes an appearance of course Smile ).

I assume that %PL is intelligent enough to plot whole numbers of 'orders of magnitude' i.e. the major y scale is 10n , n=n1 to n2 and doesn't 'chop' the top and bottom of scale to precisely plot the max/min values right on the edge of the graph ?
(not sure I've expressed that very well)
In other words that the scale is 'extended to end in 'whole numbers' at top and bottom i.e. all the major tics on the scale are f the form 1.0 x 10^n i.e. log(scale_max) and log(scale_min) are whole numbers

Thinking further, I don't see the problem at all with plotting the data as it is. A simple check that all the data is positive and non-zero (bombing out if any isn't) should suffice (with error message and identifying the culprit data of course).
Need an example really to demonstrate what I mean.
(I now think I'm more confused than when I started this jibberish !)
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Sat Apr 08, 2017 1:51 am    Post subject: Re: Reply with quote

John-Silver wrote:
A better option would be to simply not plot the points below a certain level


Yes, exactly. You set the Y_min and Y_max and anything below and above is ignored. That's how all usually do
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 Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 6 of 8

 
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