<div dir="ltr">Hi Gene,<div><br></div><div>To answer your first question, here is a sample piecewise-defined function in Gnuplots:</div><div><br></div><div><gnuplot width="400" solid="0" plotcolor="monochrome" gridlayer="off" bmargin="default" font="9" alttag="dynamically generated plot" bgcolor="xffffff" texfont="22" transparent="off" plottype="Cartesian" rmargin="default" gridtype="Cartesian" minor_ticscale="0.5" fontface="sans-serif" grid="on" align="middle" texwidth="93" height="300" border="on" samples="1000" fgcolor="x000000" major_ticscale="1" tmargin="default" lmargin="default" fillstyle="empty"><br>    <axis yzero="off" xformat="on" xmin="-10.0" yformat="on" color="x000000" ymax="10.0" ymin="-10.0" xmax="10.0" xzero="off" /><br>    <curve <br>         linestyle="lines"<br>         color="x000000"<br>         pointtype="1"<br>         linetype="solid"<br>         linewidth="1"<br>         name=""<br>         limit="closed"<br>         pointsize="1" ><br>        <function>x < 0 ? -x : x**2</function>         <br>    </curve><br></gnuplot></div><div><br></div><div>Best,</div><div>Justin<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="border:0px;margin:0px;padding:0px"><div style="border:0px;margin:0px;padding:0px"><h3 style="border:0px;margin:1.5rem 0px;padding:0px"><div style="color:rgb(0,0,0);font-family:"Source Serif Pro",sans-serif;font-size:16px;border:0px;margin:0px;padding:0px"><div style="border:0px;margin:0px;padding:0px"><p style="border:0px;margin:1rem 0px 1.5rem;padding:0px;font-stretch:normal;font-size:12px;line-height:18px;font-family:Arial,Helvetica,sans-serif"><span style="font-weight:normal">--</span></p><p style="font-weight:100;border:0px;margin:1rem 0px 1.5rem;padding:0px;font-stretch:normal;font-size:12px;line-height:18px;font-family:Arial,Helvetica,sans-serif"><b>Justin Gray</b><br>Senior Lecturer | Department of Mathematics<br>Simon Fraser University | SCK 10531<br>8888 University Dr., Burnaby, B.C. V5A 1S6<br>Canada<br>T: 778.782.4237<br></p></div></div><span style="font-weight:normal"><font size="1">Simon Fraser University is located on the Unceded Coast Salish Territories of the xʷməθkʷəy̓əm (Musqueam), Səl̓ílwətaʔ/Selilwitulh (Tsleil-Waututh), Kwikwitlem, and Skwxwú7mesh Úxwumixw (Squamish) Peoples<br></font></span></h3></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 21, 2020 at 11:36 AM Harding, Gene L <<a href="mailto:glhardin@purdue.edu">glhardin@purdue.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_-3670581294491778978WordSection1">
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Does anyone know how to define a piecewise linear function in LON-CAPA, and plot it with gnuplot? And, a related question: How  do you put plots next to each other?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I need to display a plot of voltage on one graph, with a plot of phase-angle-fired half-sine current right below it on a separate graph, but using the same horizontal axis values and scale. The multiplot command in gnuplot allows multiple
 plots next to each other, similar to MATLAB, and the ternary operator allows definition of piecewise linear functions, but I don’t know how to implement either of them from within LON-CAPA.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Best regards,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Gene L. Harding, PE<u></u><u></u></p>
<p class="MsoNormal">Associate Professor of ECET<u></u><u></u></p>
<p class="MsoNormal">Purdue University<u></u><u></u></p>
<p class="MsoNormal">574-520-4190<u></u><u></u></p>
<p class="MsoNormal"><a href="https://polytechnic.purdue.edu/south-bend/" target="_blank">https://polytechnic.purdue.edu/south-bend/</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

</blockquote></div>