1

How to write text in graphs partially in italics, please? For instance, here:

x = 0.01*(FINDGEN(201))

p1 = PLOT(x, EXPINT(1, x), '2', YRANGE=[0,2])
p2 = PLOT(x, EXPINT(2, x), 'r2', /OVERPLOT)
p3 = PLOT(x, EXPINT(3, x), 'g2', /OVERPLOT)

t1 = TEXT(0.3, 1.6, $
   '$E_n(z) = \int_{1}^{\infty} ' + $
  'e^{-zt} t^{-n} dt, \Re(z)\ge 0$', $
  /DATA, FONT_SIZE=14, FONT_STYLE='Italic')

t2 = TEXT([0.4, 0.22, 0.1], [0.8, 0.58, 0.2], $
      '$\it n = '+['1','2','3']+'$', /DATA)

Source

How to write only the n in italics?

'$\it n = 2$'
FObersteiner
  • 22,500
  • 8
  • 42
  • 72
Elena Greg
  • 1,061
  • 1
  • 11
  • 26

1 Answers1

0

you have to change back to normal font style by using command \rm (docs, section "Changing Fonts and Special Characters").

Ex:

t2 = TEXT([0.4, 0.22, 0.1], [0.8, 0.58, 0.2], '$\it italic\rm  normal$', /DATA)

enter image description here

FObersteiner
  • 22,500
  • 8
  • 42
  • 72