0

In Python I am currently plotting some data and extracting the maximum values. now i want to have a label which looks like this: Fmax = ... and Dmax = ..., except for the max being a subscript, like "down".

The label currently looks like this:

a1.plot(z, k, label = "Kraft [Fmax: %s N], "%(round(max(k))))

Thanks for help in advance!

JoelC
  • 3,664
  • 9
  • 33
  • 38

1 Answers1

0

Unicode has some subscript letters:

u'Kraft [Fₘₐₓ: %s N], '
u'Kraft [F\u2098\u2090\u2093: %s N], ' # same value escaped for ASCII-safe source

but you would need to be using a font that supported them.

Otherwise, you would be dependent on whatever text formatting features are provided by whatever the graphics library you are using is; if none then you would have to place the max yourself manually in a smaller font at the right position.

bobince
  • 528,062
  • 107
  • 651
  • 834