带有正方形和箭头的乳胶图

带有正方形和箭头的乳胶图

我不确定这是否是一个可以接受的问题,但我想我可以尝试一下。

我正在尝试使用 LaTeX 复制一个基本图表,但却不知道如何开始。 在此处输入图片描述

答案1

画图并不难。但是你却强迫任何愿意回答你问题的人从你的屏幕截图中输入内容。你不觉得这有点过分吗?

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{shapes,fit,positioning,backgrounds,shadows}
\tikzset{pics/.cd,
Gauss graph/.style n args={4}{
code={
\draw[-latex] (0,-0.5) -- (0,2.5);
\draw[-latex] (-1,0) -- (3.65,0);
\draw[thick] plot[variable=\x,domain=-1:3.5,samples=51] ({\x},{#3*Gauss(\x,#1,#2)});
\node[anchor=south] at (1.5,0){#4};
}}}
\tikzset{cylinder end fill/.style={path picture={
\pgftransformshift{\centerpoint}%
\pgftransformrotate{\rotate}%  
\pgfpathmoveto{\beforetop}%
\pgfpatharc{90}{-270}{\xradius and \yradius}%
\pgfpathclose
\pgfsetfillcolor{#1}%
\pgfusepath{fill}}
}}
\begin{document}
\begin{tikzpicture}[font=\sffamily,
declare function={Gauss(\x,\y,\z)=exp(-(\x-\y)*(\x-\y)/\z);}]
% left Gauss
\pic[local bounding box=Gauss-1] at (0,0) {Gauss graph={1.25}{1}{1.2}{$complicated$}};
\node[above=6mm of Gauss-1,anchor=north,align=center] (lab1) {Marmot view\\ (default view)};
\node[ellipse,draw,fill=gray!20,above=2cm of Gauss-1](public) {Public information};
% right Gauss
\pic[local bounding box=Gauss-2] at (9,0) {Gauss graph={1.25}{1}{1.5}{$complicated$}};
\node[above=6mm of Gauss-2,anchor=north,align=center] (lab2) {PM views};
\node[ellipse,draw,fill=gray!20,above=2cm of Gauss-2] (private) {Private information};
% fits
\begin{scope}[on background layer]
\node[ellipse,draw,fill=gray!20,inner ysep=-3pt,fit=(Gauss-1) (lab1)](fit1){};
\node[ellipse,draw,fill=gray!20,inner ysep=-3pt,fit=(Gauss-2) (lab2)](fit2){};
\end{scope}
\node[draw,fit=(public) (private) (fit1) (fit2),inner ysep=9mm](upper fit){};
\node[below right=1pt of upper fit.north west,anchor=north west] {View
generation};
% lower Guss
\pic[local bounding box=Gauss-3] at ([yshift=-7.2cm,xshift=-1.35cm]upper fit.south) {Gauss
graph={1.25}{1.2}{2}{$complicated$}};
\node[above=6mm of Gauss-3,anchor=north,align=center] (lab3) {Combined views};
\begin{scope}[on background layer]
\node[ellipse,draw,fill=gray!20,inner ysep=-3pt,fit=(Gauss-3) (lab3)](fit3){};
\end{scope}
\node [draw,drop shadow,
  shape=cylinder,
  aspect=0.45,
  minimum height=3cm,
  minimum width=1cm,
  cylinder end fill=blue,
  left color=blue!30,
  right color=black,
  middle color=blue!80,
  shading angle=20,
  align=center,
  text=white,below=5mm of fit3]  (cylinder2) {Portfolio\\ optimizer};
% second frame
\node[draw,fit=(upper fit.west |-fit3.center) (upper fit.east |-fit3.center)
(fit3) (cylinder2.center),inner ysep=9mm,inner xsep=0pt](lower fit){};
\node[below right=1pt of lower fit.north west,anchor=north west] {Portolio
optimization};
% 
\node[ellipse,draw,fill=gray!20,below=3mm of lower fit,align=center](rel) {Relatively \\};
%
\draw (fit1.south) -- ++ (0,-3mm) -| (fit2.south) coordinate[pos=0.25] (aux);
\path (upper fit.south) -- (lower fit.north)
node [midway,draw,drop shadow,
  shape=cylinder,
  aspect=0.45,
  minimum height=3cm,
  minimum width=1cm,
  cylinder end fill=blue,
  left color=blue!30,
  right color=black,
  middle color=blue!80,
  shading angle=20,
  align=center,
  text=white]  (cylinder1) {Black--Littermann\\ model};
\draw[-latex] (aux -| cylinder1.north) -- (cylinder1.north);
\draw[-latex] (cylinder1) -- (fit3);
\draw[-latex] (fit3) -- (cylinder2);
\draw[-latex] (cylinder2) -- (rel);
\draw[-latex] (public) -- (fit1);
\draw[-latex] (private) -- (fit2);
\draw[-latex] (public) -- (fit2);
\node[cloud,draw,drop shadow,fill=white,align=center,anchor=west] at
([xshift=-3mm]cylinder1.east)
{Systematic \\ blah blah};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容