I have a plot with four curves, and I wish to add vertical marker to pinpint the exact moment the curve drops below a certain threshold, much like this:

enter image description here

I'd like to be able to control the width of the horizontal bar, as well as the label above it, and it should work on a logarithmic scale on the horizontal axis. How exactly do I do that?

  • Should this be an automatic solution, i.e. you specify the threshold level, or do you want to specify the horizontal position? – Jake Jul 16 '13 at 22:12
  • I know the positions beforehand, I just need to draw the markers. – joaocandre Jul 16 '13 at 22:29
  • Do you want to be able to specify the heights of the lines? If yes, how do you want to specify them? Same thing for the widths of the bars, do you want to specify them in terms of the axis units, or in paper units? – Jake Jul 16 '13 at 22:36
  • The problem with axis units is that I am using a logaritmic scale, so I'd rather specify the width of the bar in paper units. The height is fine either way. – joaocandre Jul 17 '13 at 1:11

This solution is one of last resort, because the dimensions you must specify do not correspond to the graph quantities, but rather to physical length measurements on the image itself.

The solution is obtained by placing an inset overtop of the figure. The inset consists of a manually constructed bar and label (in this case, with a label of 5.6).


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.