Graphs with min and max values attached

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.

Graphs with min and max values attached

Unread postby ege_man » Wed Feb 19, 2020 7:14 am

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
ege_man
 
Posts: 86
Joined: Sat Jul 07, 2012 2:39 pm

Re: Graphs with min and max values attached

Unread postby TomDoan » Wed Feb 19, 2020 11:33 am

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.
TomDoan
 
Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm

Re: Graphs with min and max values attached

Unread postby ege_man » Wed Feb 19, 2020 11:38 am

Dear Tom
Thank you for your prompt reply. I would like to also see the date for max and min. Is it possible?
ege_man
 
Posts: 86
Joined: Sat Jul 07, 2012 2:39 pm

Re: Graphs with min and max values attached

Unread postby TomDoan » Wed Feb 19, 2020 4:15 pm

%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.
TomDoan
 
Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm


Return to Graphics, Reports, and Other Output

Who is online

Users browsing this forum: No registered users and 2 guests

cron