# Drawing and inserting mathematical symbols on a Dia generated graph

I use graph via Dia to draw graphs. But I want to insert an equation or symbol on the graph. Is there any way to put an equation symbol such as $\alpha$ or $\beta$ on the graph?

I have inserted latex into the dia directly, and it is showing like this:

EDIT:

-
In Dia or in the generated TikZ code? Please provide an MWE. –  Holene Nov 10 '13 at 16:13
It's not clear whether you export the Dia figure as a picture, or you export it as TikZ code and embed this code in your document. Please provide a complete minimal working example of how you intend to import the graph to your document. –  Holene Nov 10 '13 at 16:58
I was trying to draw in the dia without code but when I finished the drawing I wanted to insert various math symbol. But there was nothing in DIa to be added. How can I convert the image to TikZ code? –  Complex Guy Nov 10 '13 at 17:07
You can add equations or symbols or other drawing on top of the dia picture: see e.g. drawing-on-an-image –  g.kov Nov 10 '13 at 18:39
How to run these code? will I insert into latex file? I have inserted already but the file is not showing i mean the editor is not working. –  Complex Guy Nov 10 '13 at 19:08

## Final

\documentclass[pstricks,border=12pt,12pt]{standalone}
\usepackage{amsmath}
\usepackage{pst-plot,pst-node}
\psset{algebraic,plotpoints=100,labelsep=3pt}

\def\f[#1,#2]{2*2^(-2.5*(#1-#2)^2)}

\begin{document}
\begin{pspicture}[showgrid=false](-3,0)(3.5,3)
\psaxes[axesstyle=frame,tickstyle=bottom,ticks=x,ticksize=0 4pt,xsubticks=5,xsubticksize=.5,labels=none](0,0)(-3,0)(3,3)
\uput[d](-1,0){$\omega_{\text{nl}}$}
\uput[d](1.5,0){$\omega_{\text{lin}}$}
\uput[d](0,0){\tiny Frequency}
\psline{<-}(0,2)(1,2)
\psset{linecolor=gray}
\psline[linestyle=dashed](0,0)(0,3)
\psplot[linecolor=red,linestyle=dashed]{-3}{1}{\f[x,-1]}
\psplot[linecolor=red]{-.5}{3}{\f[x,1.5]}
\pcline{<->}(*-1.5 {\f[x,-1]})(*-.5 {\f[x,-1]})\nbput{$r_{\text{nl}}$}
\pcline{<->}(*1 {\f[x,1.5]})(*2 {\f[x,1.5]})\nbput{$r_{\text{lin}}$}
\end{pspicture}
\end{document}


-
how did you get the coordinates? Have you got from DIA? how can I predit coordinates for the other graph? Like I have edited in the question. –  Complex Guy Nov 10 '13 at 17:33
Actually I want to draw the graph identical I have added in the edit. I used DIA but inserting symbol is hard I think. I saw you are using latex code. So I am confused how to art in a better way. –  Complex Guy Nov 10 '13 at 17:45
Okay thank you. –  Complex Guy Nov 10 '13 at 17:50
But what you have edited is not look identical with the pic I have posted. –  Complex Guy Nov 10 '13 at 18:27
YOu made it thanks, Now please give me some tips so I can draw more graphics by latex. My questions are: (1) I have inserted your code in a lex file but the file is not running in latex editor kile. Is anything wrong? (2) How will I see the instantaneous output for the input I will give? more precisely, how did you do draw this pic accurately by latex code? (3) Will I draw this by using latex editor or terminal in Ubuntu. or I can use this into DIA) By the way I am using in Ubuntu. And atlast thanks you did great. –  Complex Guy Nov 10 '13 at 18:51

If you have the complete drawing in Dia, you can chose to export the picture as LaTeX PGF macros. You'll then have a .tex file, lets say yourDiaDrawing.tex, which you can include in your document by \input{pathToFile/yourDiaDrawing.tex}. If you have added your labels in Dia, find the nodes containing your label texts in yourDiaDrawing.tex. When exporting to TikZ, Dia assumes that every special character you have inserted are supposed to be that way, and escapes the characters. So your math dollars will be escaped \$, your backslashes will be escaped \\ and so on. Remove the backslash, and LaTeX does the rest. You'll probably find nodes in yourDiaDrawing.tex that'll look something like this \node[anchor=west] at (13.00\du,8.00\du){\$ \\alpha \\$};

-

Alternatively you can input the respective Unicode characters:

In a text box in dia press Ctrl+Shift+U, release the U, then type the UTF-32 hex code for the characters you want. For example for \alpha this would be 3b1.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9038702249526978, "perplexity": 1972.9183029234598}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-18/segments/1429246658061.59/warc/CC-MAIN-20150417045738-00309-ip-10-235-10-82.ec2.internal.warc.gz"}