plot - Figuring out where to add text in a MATLAB histogram -


i have matlab histogram graph produced data, 50 bins. need insert line of text graph, @ place wouldn't tangle histogram bars. text 'period of data used: mmm dd mmm dd' (i mention give idea of width required , text can split if necessary).

one method considered finding out series of contiguous histogram bins freq (y axis) remains less 90% of maximum of frequencies; then, text can printed @ x position starting @ first of bins near top of graph.

is way of going it? if so, how compute contiguous series of bins without looping around?

or there better way of placing text adaptively according data?

edit: due other considerations, number of histogram bins not fixed 50 more, rather xmax/20 xmax maximum x-axis value. algorithms depend on working on aggregates of number of bins might need take variability account, when calculating number.

i think simplest way use multiline title, optionally along tex formatting de-emphasise additional info. make multiline title, pass cell array of strings this:

title({'\fontsize{16}actual title';'\fontsize{8}other info'}) 

being consistent across histograms, think tidier having text on graph might move around.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -