{"id":70,"date":"2011-08-25T15:34:00","date_gmt":"2011-08-25T15:34:00","guid":{"rendered":"https:\/\/www.root42.de\/blog\/?p=70"},"modified":"2011-08-25T15:34:00","modified_gmt":"2011-08-25T15:34:00","slug":"latex-formulas-in-gnuplot","status":"publish","type":"post","link":"https:\/\/www.root42.de\/blog\/?p=70","title":{"rendered":"LaTeX formulas in gnuplot"},"content":{"rendered":"<p>As a reminder to myself: On the TeX Stackexchange, there is a nice question and discussion by me and some helpful people on <a href=\"http:\/\/tex.stackexchange.com\/questions\/26502\/latex-formulas-in-gnuplot-plot-legends\">how to use LaTeX code in gnuplot<\/a>&nbsp;\/ how to embed LaTeX equations in a plot. A copy of my revised answer:<\/p>\n<p>First, we set up a gnuplot called test.plt:<\/p>\n<pre>plot [-5:5] [-1.5:1.5] sin(x+pi) title \"$\\sin(x+\\pi)$\"\n<br \/><\/pre>\n<p>Then we also set up a small Makefile:<\/p>\n<pre>.SUFFIXES: .plt .tex .pdf\n<br \/>\n<br \/>%.tex: %.plt\n<br \/>gnuplot -e \" \n<br \/>\tset format '$%g$' ; \n<br \/>\tset terminal epslatex standalone color ; \n<br \/>\tset output '$@' \n<br \/>\t\" $&lt;\n<br \/>\n<br \/>%.pdf: %.tex\n<br \/>\tpdflatex $&lt;\n<br \/>\n<br \/>all: test.pdf\n<br \/><\/pre>\n<p>Running &#8220;make all&#8221; will produce this plot: <\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/3.bp.blogspot.com\/-gxK_W-fiRxw\/TldHKPAXA-I\/AAAAAAAAAfI\/9rWhpHENEsw\/s1600\/test.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" border=\"0\" height=\"280\" src=\"http:\/\/3.bp.blogspot.com\/-gxK_W-fiRxw\/TldHKPAXA-I\/AAAAAAAAAfI\/9rWhpHENEsw\/s400\/test.png\" width=\"400\" \/><\/a><\/div>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>As a reminder to myself: On the TeX Stackexchange, there is a nice question and discussion by me and some helpful people on how to use LaTeX code in gnuplot&nbsp;\/ how to embed LaTeX equations in a plot. A copy of my revised answer: First, we set up a gnuplot called test.plt: plot [-5:5] [-1.5:1.5] &hellip; <a href=\"https:\/\/www.root42.de\/blog\/?p=70\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;LaTeX formulas in gnuplot&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[53,51,34,52],"tags":[],"_links":{"self":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/70"}],"collection":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=70"}],"version-history":[{"count":0,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=\/wp\/v2\/posts\/70\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.root42.de\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}