绘制两条斜率不同的直线

绘制两条斜率不同的直线

我想画一个简单的图形(附图),其中有两条斜率不同的线,上面有两个简单的方程在此处输入图片描述书面。

有什么建议吗?

谢谢

答案1

这是绘制的版本元帖子- 一种嵌入在 Context 和 LuaLatex 包中的绘图语言luamplib

在此处输入图片描述

\documentclass[border=5mm]{standalone}
\usepackage{luatex85}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
beginfig(1);
    % define some points
    z0 = (0, 30);
    z1 = (50, 80); 
    z2 = (140, 100);

    % and three paths
    path xx, yy, ff;
    ff = z0 -- z1 -- z2;
    xx = origin -- (x2, 0);
    yy = xx rotated 90;

    % draw the paths + the dashed line
    draw (x1, 0) -- z1 dashed evenly;
    draw ff withcolor 3/4 green;
    draw xx withcolor 2/3 blue;
    draw yy withcolor 2/3 blue;

    % some regular labels
    label.top("$\alpha, \phi_c$", point 1 of yy);
    label.bot("$a_5$", (x1, 0));
    label.bot("$\phi_e$", 1/2(x1+x2, 0));

    % rotated labels are a little more complicated
    label(textext("$a_1 + a_2(\phi)$") rotated angle direction 1/2 of ff, 
                   point 1/2 of ff shifted (7 up rotated angle direction 1/2 of ff));
    label(textext("$a_3 + a_4(\phi)$") rotated angle direction 3/2 of ff, 
                   point 3/2 of ff shifted (7 up rotated angle direction 3/2 of ff));


endfig;
\end{mplibcode}
\end{document}

相关内容