fix org babel gnuplot loading

This commit is contained in:
2026-04-08 20:14:30 +02:00
parent 2f249d0979
commit bd072b2c58
5 changed files with 339 additions and 2 deletions

View File

@@ -0,0 +1,200 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<svg
width="400" height="320"
viewBox="0 0 400 320"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<title>Gnuplot</title>
<desc>Produced by GNUPLOT 6.0 patchlevel 4 </desc>
<g id="gnuplot_canvas">
<rect x="0" y="0" width="400" height="320" fill="none"/>
<defs>
<circle id='gpDot' r='0.5' stroke-width='0.5' stroke='currentColor'/>
<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
<rect id='gpPt4' stroke-width='0.222' stroke='currentColor' fill='currentColor' x='-1' y='-1' width='2' height='2'/>
<circle id='gpPt5' stroke-width='0.222' stroke='currentColor' cx='0' cy='0' r='1'/>
<use xlink:href='#gpPt5' id='gpPt6' fill='currentColor' stroke='none'/>
<path id='gpPt7' stroke-width='0.222' stroke='currentColor' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>
<use xlink:href='#gpPt7' id='gpPt8' fill='currentColor' stroke='none'/>
<use xlink:href='#gpPt7' id='gpPt9' stroke='currentColor' transform='rotate(180)'/>
<use xlink:href='#gpPt9' id='gpPt10' fill='currentColor' stroke='none'/>
<use xlink:href='#gpPt3' id='gpPt11' stroke='currentColor' transform='rotate(45)'/>
<use xlink:href='#gpPt11' id='gpPt12' fill='currentColor' stroke='none'/>
<path id='gpPt13' stroke-width='0.222' stroke='currentColor' d='M0,1.330 L1.265,0.411 L0.782,-1.067 L-0.782,-1.076 L-1.265,0.411 z'/>
<use xlink:href='#gpPt13' id='gpPt14' fill='currentColor' stroke='none'/>
<filter id='textbox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>
<feFlood flood-color='white' flood-opacity='1' result='bgnd'/>
<feComposite in='SourceGraphic' in2='bgnd' operator='atop'/>
</filter>
<filter id='greybox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>
<feFlood flood-color='lightgrey' flood-opacity='1' result='grey'/>
<feComposite in='SourceGraphic' in2='grey' operator='atop'/>
</filter>
</defs>
<g fill="none" color="white" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,262.40 L73.14,262.40 M374.82,262.40 L365.82,262.40 '/> <g transform="translate(55.75,266.30)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" >-20</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,239.25 L73.14,239.25 M374.82,239.25 L365.82,239.25 '/> <g transform="translate(55.75,243.15)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" >-10</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,216.09 L73.14,216.09 M374.82,216.09 L365.82,216.09 '/> <g transform="translate(55.75,219.99)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" > 0</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,192.94 L73.14,192.94 M374.82,192.94 L365.82,192.94 '/> <g transform="translate(55.75,196.84)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" > 10</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,169.78 L73.14,169.78 M374.82,169.78 L365.82,169.78 '/> <g transform="translate(55.75,173.68)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" > 20</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,146.63 L73.14,146.63 M374.82,146.63 L365.82,146.63 '/> <g transform="translate(55.75,150.53)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" > 30</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,123.47 L73.14,123.47 M374.82,123.47 L365.82,123.47 '/> <g transform="translate(55.75,127.37)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" > 40</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,100.32 L73.14,100.32 M374.82,100.32 L365.82,100.32 '/> <g transform="translate(55.75,104.22)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" > 50</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,77.16 L73.14,77.16 M374.82,77.16 L365.82,77.16 '/> <g transform="translate(55.75,81.06)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" > 60</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,54.01 L73.14,54.01 M374.82,54.01 L365.82,54.01 '/> <g transform="translate(55.75,57.91)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" > 70</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,262.40 L64.14,253.40 M64.14,54.01 L64.14,63.01 '/> <g transform="translate(64.14,284.30)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" >-8</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M102.98,262.40 L102.98,253.40 M102.98,54.01 L102.98,63.01 '/> <g transform="translate(102.98,284.30)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" >-6</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M141.81,262.40 L141.81,253.40 M141.81,54.01 L141.81,63.01 '/> <g transform="translate(141.81,284.30)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" >-4</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M180.65,262.40 L180.65,253.40 M180.65,54.01 L180.65,63.01 '/> <g transform="translate(180.65,284.30)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" >-2</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M219.48,262.40 L219.48,253.40 M219.48,54.01 L219.48,63.01 '/> <g transform="translate(219.48,284.30)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" > 0</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M258.32,262.40 L258.32,253.40 M258.32,54.01 L258.32,63.01 '/> <g transform="translate(258.32,284.30)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" > 2</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M297.15,262.40 L297.15,253.40 M297.15,54.01 L297.15,63.01 '/> <g transform="translate(297.15,284.30)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" > 4</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M335.99,262.40 L335.99,253.40 M335.99,54.01 L335.99,63.01 '/> <g transform="translate(335.99,284.30)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" > 6</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M374.82,262.40 L374.82,253.40 M374.82,54.01 L374.82,63.01 '/> <g transform="translate(374.82,284.30)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" > 8</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,54.01 L64.14,262.40 L374.82,262.40 L374.82,54.01 L64.14,54.01 Z '/></g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
</g>
<g id="gnuplot_plot_1" ><title>unsorted</title>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<g transform="translate(307.09,75.91)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" >unsorted</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<use xlink:href='#gpPt0' transform='translate(219.48,207.41) scale(4.50)' color='rgb(148, 0, 211)'/>
<use xlink:href='#gpPt0' transform='translate(238.90,205.83) scale(4.50)' color='rgb(148, 0, 211)'/>
<use xlink:href='#gpPt0' transform='translate(258.32,203.36) scale(4.50)' color='rgb(148, 0, 211)'/>
<use xlink:href='#gpPt0' transform='translate(277.73,207.99) scale(4.50)' color='rgb(148, 0, 211)'/>
<use xlink:href='#gpPt0' transform='translate(336.76,72.01) scale(4.50)' color='rgb(148, 0, 211)'/>
</g>
</g>
<g id="gnuplot_plot_2" ><title>sorted</title>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<g transform="translate(307.09,93.91)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="end">
<text><tspan font-family="Arial" >sorted</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<use xlink:href='#gpPt2' transform='translate(219.48,210.30) scale(4.50)' color='rgb( 86, 180, 233)'/>
<use xlink:href='#gpPt2' transform='translate(238.90,209.14) scale(4.50)' color='rgb( 86, 180, 233)'/>
<use xlink:href='#gpPt2' transform='translate(258.32,209.14) scale(4.50)' color='rgb( 86, 180, 233)'/>
<use xlink:href='#gpPt2' transform='translate(277.73,207.99) scale(4.50)' color='rgb( 86, 180, 233)'/>
<use xlink:href='#gpPt2' transform='translate(336.76,90.01) scale(4.50)' color='rgb( 86, 180, 233)'/>
</g>
</g>
<g fill="none" color="white" stroke="rgb( 86, 180, 233)" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter">
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter">
</g>
<g fill="none" color="black" stroke="black" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<path stroke='black' d='M64.14,54.01 L64.14,262.40 L374.82,262.40 L374.82,54.01 L64.14,54.01 Z '/> <g transform="translate(19.18,158.21) rotate(270.00)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" >Y</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<g transform="translate(219.48,311.30)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" >X</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
<g transform="translate(219.48,30.91)" stroke="none" fill="black" font-family="Arial" font-size="12.00" text-anchor="middle">
<text><tspan font-family="Arial" >Putting it All Together</tspan></text>
</g>
</g>
<g fill="none" color="black" stroke="currentColor" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 14.1.4 (0)
-->
<!-- Title: G Pages: 1 -->
<svg width="309pt" height="260pt"
viewBox="0.00 0.00 309.00 260.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 256)">
<title>G</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-256 305.37,-256 305.37,4 -4,4"/>
<!-- main -->
<g id="node1" class="node">
<title>main</title>
<ellipse fill="none" stroke="black" cx="158.98" cy="-234" rx="29.86" ry="18"/>
<text xml:space="preserve" text-anchor="middle" x="158.98" y="-228.95" font-family="Times,serif" font-size="14.00">main</text>
</g>
<!-- parse -->
<g id="node2" class="node">
<title>parse</title>
<ellipse fill="none" stroke="black" cx="114.98" cy="-162" rx="30.37" ry="18"/>
<text xml:space="preserve" text-anchor="middle" x="114.98" y="-156.95" font-family="Times,serif" font-size="14.00">parse</text>
</g>
<!-- main&#45;&gt;parse -->
<g id="edge1" class="edge">
<title>main&#45;&gt;parse</title>
<path fill="none" stroke="black" d="M148.78,-216.76C143.56,-208.46 137.08,-198.15 131.19,-188.79"/>
<polygon fill="black" stroke="black" points="134.22,-187.03 125.94,-180.43 128.3,-190.76 134.22,-187.03"/>
</g>
<!-- init -->
<g id="node4" class="node">
<title>init</title>
<ellipse fill="none" stroke="black" cx="56.98" cy="-90" rx="27" ry="18"/>
<text xml:space="preserve" text-anchor="middle" x="56.98" y="-84.95" font-family="Times,serif" font-size="14.00">init</text>
</g>
<!-- main&#45;&gt;init -->
<g id="edge3" class="edge">
<title>main&#45;&gt;init</title>
<path fill="none" stroke="black" d="M134.44,-223.59C115.55,-215.06 90.31,-200.65 75.98,-180 63.72,-162.32 59.13,-138.27 57.51,-119.62"/>
<polygon fill="black" stroke="black" points="61.02,-119.56 56.92,-109.79 54.03,-119.98 61.02,-119.56"/>
</g>
<!-- cleanup -->
<g id="node5" class="node">
<title>cleanup</title>
<ellipse fill="none" stroke="black" cx="202.98" cy="-162" rx="39.58" ry="18"/>
<text xml:space="preserve" text-anchor="middle" x="202.98" y="-156.95" font-family="Times,serif" font-size="14.00">cleanup</text>
</g>
<!-- main&#45;&gt;cleanup -->
<g id="edge4" class="edge">
<title>main&#45;&gt;cleanup</title>
<path fill="none" stroke="black" d="M169.19,-216.76C174.33,-208.58 180.7,-198.45 186.52,-189.2"/>
<polygon fill="black" stroke="black" points="189.36,-191.24 191.72,-180.91 183.44,-187.52 189.36,-191.24"/>
</g>
<!-- printf -->
<g id="node7" class="node">
<title>printf</title>
<ellipse fill="none" stroke="black" cx="269.98" cy="-18" rx="31.39" ry="18"/>
<text xml:space="preserve" text-anchor="middle" x="269.98" y="-12.95" font-family="Times,serif" font-size="14.00">printf</text>
</g>
<!-- main&#45;&gt;printf -->
<g id="edge8" class="edge">
<title>main&#45;&gt;printf</title>
<path fill="none" stroke="black" d="M185.3,-225.4C206.97,-217.67 236.55,-203.44 251.98,-180 278.4,-139.86 277.57,-81.58 274.1,-47.26"/>
<polygon fill="black" stroke="black" points="277.62,-47.22 272.98,-37.69 270.67,-48.03 277.62,-47.22"/>
</g>
<!-- execute -->
<g id="node3" class="node">
<title>execute</title>
<ellipse fill="none" stroke="black" cx="157.98" cy="-90" rx="39.07" ry="18"/>
<text xml:space="preserve" text-anchor="middle" x="157.98" y="-84.95" font-family="Times,serif" font-size="14.00">execute</text>
</g>
<!-- parse&#45;&gt;execute -->
<g id="edge2" class="edge">
<title>parse&#45;&gt;execute</title>
<path fill="none" stroke="black" d="M124.95,-144.76C129.98,-136.58 136.21,-126.45 141.89,-117.2"/>
<polygon fill="black" stroke="black" points="144.72,-119.28 146.97,-108.92 138.75,-115.61 144.72,-119.28"/>
</g>
<!-- make_string -->
<g id="node6" class="node">
<title>make_string</title>
<ellipse fill="none" stroke="black" cx="56.98" cy="-18" rx="56.98" ry="18"/>
<text xml:space="preserve" text-anchor="middle" x="56.98" y="-12.95" font-family="Times,serif" font-size="14.00">make_string</text>
</g>
<!-- execute&#45;&gt;make_string -->
<g id="edge5" class="edge">
<title>execute&#45;&gt;make_string</title>
<path fill="none" stroke="black" d="M137.05,-74.5C123.27,-64.95 104.96,-52.25 89.32,-41.41"/>
<polygon fill="black" stroke="black" points="91.45,-38.63 81.24,-35.81 87.46,-44.38 91.45,-38.63"/>
</g>
<!-- execute&#45;&gt;printf -->
<g id="edge6" class="edge">
<title>execute&#45;&gt;printf</title>
<path fill="none" stroke="black" d="M180.38,-75C197.48,-64.32 221.21,-49.48 239.95,-37.77"/>
<polygon fill="black" stroke="black" points="241.6,-40.86 248.23,-32.6 237.89,-34.93 241.6,-40.86"/>
</g>
<!-- compare -->
<g id="node8" class="node">
<title>compare</title>
<ellipse fill="none" stroke="black" cx="174.98" cy="-18" rx="43.16" ry="18"/>
<text xml:space="preserve" text-anchor="middle" x="174.98" y="-12.95" font-family="Times,serif" font-size="14.00">compare</text>
</g>
<!-- execute&#45;&gt;compare -->
<g id="edge9" class="edge">
<title>execute&#45;&gt;compare</title>
<path fill="none" stroke="black" d="M162.18,-71.7C163.97,-64.32 166.11,-55.52 168.12,-47.25"/>
<polygon fill="black" stroke="black" points="171.51,-48.12 170.47,-37.58 164.71,-46.47 171.51,-48.12"/>
</g>
<!-- init&#45;&gt;make_string -->
<g id="edge7" class="edge">
<title>init&#45;&gt;make_string</title>
<path fill="none" stroke="black" d="M56.98,-71.7C56.98,-64.41 56.98,-55.73 56.98,-47.54"/>
<polygon fill="black" stroke="black" points="60.48,-47.62 56.98,-37.62 53.48,-47.62 60.48,-47.62"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -4,7 +4,7 @@
** syntax highlighting
*** graphviz dot
#+begin_src dot
#+begin_src dot :file img/src-dot.svg
digraph G {
main -> parse -> execute;
main -> init;
@@ -17,6 +17,10 @@ digraph G {
}
#+end_src
#+ATTR_ORG: :width 300
#+RESULTS:
[[file:img/src-dot.svg]]
*** gnuplot
#+begin_src gnuplot :results silent
reset
@@ -39,6 +43,20 @@ h(x) = 10*sqrt(abs(x))
plot f(x) w lp lw 1, g(x) w p lw 2, h(x) w l lw 3
#+end_src
#+NAME: tab-gnuplot
| 3.75 | 2.5 |
| 4.43 | 3 |
| 5.5 | 3 |
| 3.5 | 3.5 |
#+begin_src gnuplot :var data=tab-gnuplot :exports results :file img/gnuplot-tab.svg
set terminal svg size 400,320
plot data u 1 t "unsorted", \
'' u 2 lt 3 t "sorted"
#+end_src
#+RESULTS:
[[file:img/gnuplot-tab.svg]]
** custom header

View File

@@ -797,7 +797,10 @@ nil the return value is nil"
:commands (gpl-file gpl-term gpl-prologue)
:init
(with-eval-after-load 'org
(add-to-list 'org-babel-load-languages '(gnuplot . t)))
(add-to-list 'org-babel-load-languages '(gnuplot . t))
(org-babel-do-load-languages
'org-babel-load-languages
org-babel-load-languages))
:config
;; gnuplot config for own org export projects, used in preamble
(defvar gnuplot-init-light "reset ; \

View File

@@ -22,6 +22,7 @@
(setq graphviz-dot-preview-extension "svg")
(setq graphviz-dot-view-command "open %s"))
;; !!! SEE `ob-gnuplot' in `org-settings'
(use-package gnuplot
:commands gnuplot-mode
:mode "\\.gp\\'")