I commonly add text onto graphs using "Add graphics script". I prefer to script it which means specifying x and y coordinates so the text appears in a good place on the graph.
I am stuck with histograms (in the Distribution platform) because I don't know how to get the y-axis scale which is based on the density axis. The x-axis is easy enough - it is based on the original data - but I need both x and y for my added text to appear in a meaningful place.
An example simple script is:
dist = Distribution(
Continuous Distribution( Column( :C1 ), Horizontal Layout( 1 ), Vertical( 0 ) ),
Histograms Only
);
rdist = dist << report; // rdist << Show Tree Structure;
axis_box = rdist[axis box( 1 )];
x_max = axis_box << Get Max; // show(x_max);
framebox = rdist[frame box( 1 )];
framebox << Add Graphics Script(
Text Color( "red" );
Text( Center Justified, {0.98 * x_max, 0.4}, "centered" ); // 0.4 is the y-value, but how to know the density axis scale?
);
Can anybody help? i.e. how to access details of the histogram's density axis so I can get the relevant information and then script where my desired text appears on the graph?