Borrar filtros
Borrar filtros

Adding text to plot that is a crystal direction

1 visualización (últimos 30 días)
Benjamin Cowen
Benjamin Cowen el 10 de En. de 2017
Comentada: Walter Roberson el 11 de En. de 2017
Hey, so I want to add text to a plot that is a crystal direction. Sounds easy enough, right?
It's easy to do [110], but what if I want to do [-110]? If you are familiar with crystallography, you know that the negative sign should be above the 1. How can I do this?
  1 comentario
Star Strider
Star Strider el 10 de En. de 2017
I doubt many here are familiar with crystallography. (I’m not.) Do you have an open-source (not behind a paywall) reference so we can possibly understand what you’re doing?

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 10 de En. de 2017
text(xpos, ypos, '$\stackrel{-}{1} 1 0$','interpreter','latex')
or '$\bar{1} 1 0$' or '$\overline{1} 1 0$'
The shortest line is with \bar, then \stackrel, and \overline is longest.
The gap between the line and the digit appears to be smallest with \bar, then \overline, and largest with \stackrel
I find the \stackrel version easiest to read.
  8 comentarios
Benjamin Cowen
Benjamin Cowen el 11 de En. de 2017
I see, that makes sense. One last question if you don't mind - The spacing looks nice for all of the ones that use the LATEX. But I have some crystal directions that are just [100] and it looks really cramped. How can I apply the LATEX to this without using overline?
Walter Roberson
Walter Roberson el 11 de En. de 2017
Put $ pair around the text perhaps?

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by