首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Tikz:多目标优化

Tikz:多目标优化
EN

Stack Overflow用户
提问于 2018-02-06 03:42:03
回答 1查看 170关注 0票数 1

我正在尝试创建以下图表:

我正在尝试使用此代码,但我无法创建这些区域。

代码语言:javascript
复制
\begin{tikzpicture}
\draw [fill=black!15] plot  %
coordinates {(3.7,0.35) (3.7,3.25) (0.75,0.35)};
\draw [fill=black!30] plot  %
coordinates {(2.75,0.9) (2.75,3.5) (0.75,0.9)};
\draw[->] (0,0) -- (5,0) node[anchor=north] {$C$};
\draw   (1,0.9) node[anchor=north] {$(C_o,R_r)$}
    (2.75,2.75) node[anchor=west] {$(C_r,R_o)$}
    (3.7,0.35) node[anchor=west] {$(C_i,R_i)$};
\draw[->] (0,0) -- (0,4) node[anchor=east] {$R$};
\draw[thick,->] (3.7,0.35) -- (1,0.9);
\draw[thick,->] (3.7,0.35) -- (2.75,2.75);
\draw [gray] (2.75,2.75) arc [radius=1.52, start angle=111.6, end angle= 
168.49];
\end{tikzpicture}

有谁可以帮我?

首先非常感谢你,

胡里奥

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-02-06 05:50:06

只是一个原始的草图:

代码语言:javascript
复制
\documentclass[tikz,border=2mm]{standalone}

\begin{document}

\begin{tikzpicture}
\draw[->] (-1,0) -- (5,0) node[anchor=north] {$C$};
\draw[->] (0,-1) -- (0,4) node[anchor=east] {$R$};
\fill [gray!15] plot coordinates {(3.7,0.35) (3.2,3.2) (0.5,0.8)};
\fill [gray!15] plot [smooth cycle] coordinates {(2.7,1.35) (3.2,3.2) (1.5,2.6) (0.5,0.8)};
\fill [gray!30] plot [smooth cycle] coordinates {(3.4,0.65) (2.7,2.9) (2,2.6) (1.2,1.75) (1,0.9)};
\filldraw (3.7,0.35) circle (1.5pt);
\filldraw (2.75,2.75) circle (1.5pt);
\filldraw (1,0.9) circle (1.5pt);
\draw  (1,0.9) node[anchor=north] {$(C_o,R_r)$}
(2.75,2.75) node[anchor=west] {$(C_r,R_o)$}
(3.7,0.35) node[anchor=west] {$(C_i,R_i)$};
\draw[thick,->] (3.7,0.35) -- (1,0.9);
\draw[thick,->] (3.7,0.35) -- (2.75,2.75);
\draw[dashed] (1,0.9) arc [radius=2.2, start angle=171.6, end angle=101];
\end{tikzpicture}

\end{document}

其中,我使用\fill [gray!30]表示较暗的区域,使用两个\fill [gray!15]表示较亮的区域(两个,以便更好地绘制直线和曲线边缘)。

(1,0.9)(3.7,0.35)(2.75,2.75)这三个要点来自你的代码,在输入代码之前,其他的应该在纸上更仔细地勾勒出来。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48630263

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档