Comandos no Xmgrace (post it)


O Grace é um programa para elaboração de gráficos técnicos, ou seja, com qualidade respeitável 😉 Ele é bastante versátil. Além de fazer o básico, que é abrir um arquivo .dat e plotar os pontos no plano cartesiano (plots 3d “ainda” não são possíveis), ele conta com diversas outras funções, como data fitting, transformada de Fourier etc.

Na minha opinião, os grandes pontos fracos desse programa são a arcaica interface e a edição de legendas/texto. Os comandos para escrever equações matemáticas e símbolos são bastante antiquados. Seria ótimo se implementassem algum tipo de compatibilidade com LaTeX…

Este post é justamente para colecionar dicas achadas por aí, para eu não ter que fazer uma varredura no Google quando esquecer ou quiser aprender algum comando ou procedimento específico.

Um tutorial bem abrangente, mas um pouco superficial: http://plasma-gate.weizmann.ac.il/Grace/doc/Tutorial.html#ss2.5

Tutorial mais detalhado, contendo lista de funções etc: http://mintaka.sdsu.edu/reu/grace.tutorial.html

Notas sobre o Grace: http://www.physics.ohio-state.edu/~driver/xmgrace_notes.html

Esse site acima contém uma boa tabela de comandos de texto. Abaixo a reproduzo para futuras referências:

Typesetting

Grace permits quite complex typesetting on a per string basis. Any
string displayed (titles, legends, tick marks,...) may contain special
control codes to display subscripts, change fonts within the string
etc.

Example:

F\sX\N(\xe\f{}) = sin(\xe\f{})\#{b7}e\S-X\N\#{b7}cos(\xe\f{}) 

Control code Description
\f{x} switch to font named "x", e.g. \f{Times}
\f{n} switch to font number n
\f{}  return to original font
\R{x} switch to color named "x"
\R{n} switch to color number n
\R{}  return to original color
\#{x} treat "x" (must be of even length) as list of hexadecimal char
codes
\t{xx xy yx yy}apply transformation matrix
\t{}  reset transformation matrix
\z{x} zoom x times
\z{}  return to original zoom
\r{x} rotate by x degrees
\l{x} slant by factor x
\v{x} shift vertically by x
\v{}  return to unshifted baseline
\V{x} shift baseline by x
\V{}  reset baseline
\h{x} horizontal shift by x
\n new line
\u begin underline
\U stop underline
\o begin overline
\O stop overline
\Fk enable kerning
\FK disable kerning
\Fl enable ligatures
\FL disable ligatures
\m{n} mark current position as n
\M{n} return to saved position n
\dl LtoR substring direction
\dr RtoL substring direction
\dL LtoR text advancing
\dR RtoL text advancing
\x  switch to Symbol font (same as \f{Symbol})
\+  increase size (same as \z{1.19} ; 1.19 = sqrt(sqrt(2)))
\-  decrease size (same as \z{0.84} ; 0.84 = 1/sqrt(sqrt(2)))
\s  begin subscripting (same as \v{-0.4}\z{0.71})
\S  begin superscripting (same as \v{0.6}\z{0.71})
\T{xx xy yx yy}	same as \t{}\t{xx xy yx yy}
\Z{x} absolute zoom x times (same as \z{}\z{x})
\q make font oblique (same as \l{0.25})
\Q undo oblique (same as \l{-0.25})
\N return to normal style (same as \v{}\t{})
\\ print \
\n switch to font number n (0-9) (deprecated)
\c begin using upper 128 characters of set (deprecated)
\C stop using upper 128 characters of set (deprecated)

Alguns sugerem uma mistura do Grace e do Inkscape para facilitar o “acabamento” de seus gráficos. A idéia seria gerar o gráfico no xmGrace e fazer as inclusões de textos com o Inkscape através de sua extensão LaTeX: http://wiki.inkscape.org/wiki/index.php/LaTeX

Até mais,

5 ideias sobre “Comandos no Xmgrace (post it)

Deixe um comentário