Page 1 of 1

Graphs with min and max values attached

Posted: Wed Feb 19, 2020 6:14 am
by ege_man
Dear All,
I have a daily data on stock returns and would like to plot the series together with their min and max values attached to their places on the line. Could you please suggest me any example?
Best

Re: Graphs with min and max values attached

Posted: Wed Feb 19, 2020 10:33 am
by TomDoan
You would use GRTEXT for that (a separate GRTEXT for the max and for the min). If you do an EXTREMUM instruction on the series first, it will give you the entries for the max and min (%MAXENT and %MINENT) and the values (%MAXIMUM and %MINIMUM), which you can use to position the text. I don't see any examples with a time series graph, but the @THRESHTEST procedure does something like this for an x-y graph.

Re: Graphs with min and max values attached

Posted: Wed Feb 19, 2020 10:38 am
by ege_man
Dear Tom
Thank you for your prompt reply. I would like to also see the date for max and min. Is it possible?

Re: Graphs with min and max values attached

Posted: Wed Feb 19, 2020 3:15 pm
by TomDoan
%DATELABEL(%MAXENT) and %DATELABEL(%MINENT) will construct labels for the maximum and minimum entries. Note that the graph might look a bit cluttered if you try to put all that information on with the data lines.