Graphics, Figures & TablesTikz Chart Arrows

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
nerazzurri53
Posts: 2
Joined: Mon Jun 01, 2020 3:37 pm

Tikz Chart Arrows

Post by nerazzurri53 »

Hi everyone,

I am a beginner in Latex. Just now I tried to make a chart with four elements, see Attachment.
Here is my code, i don't quite know about how to create exact the arrows as shown in the example.can anyone be helpful? The bend arrows are from my code.

Code: Select all

Code, edit and compile here:
\usepackage{tikz,pgfplots}
\usetikzlibrary{shapes, arrows,positioning}
\tikzset{
>=stealth',
punkt/.style={
rectangle,
draw=black, thick,
text width=6.5em,
minimum height=2em,
text centered},
% Define arrow style
pil/.style={
->,
thick,
shorten <=2pt,
shorten >=2pt,}
}
\tikzstyle{linepart} = [draw, thick, dashed]
\begin{tikzpicture}[auto]
\draw [very thick] [->](0,0)--(13,0)node[above left]{$t$};
\draw [very thick] [->](0,0)--(0,6.4) node[right]{$L$};
\draw (0,0)--(1.5,2.2);
\draw (1.5,0)--(3.4772,2.9);
\draw (1.5,2.2)--(6.0835,3.8055);
\draw (3.4772,0)--(6.0835,3.8055);
\draw [very thick](0.2,2.2)--(-0.2,2.2) node[left]{$q_{1}$};
\draw [very thick](0.2,2.9)--(-0.2,2.9) node[left]{$q_{2}$};
\draw [very thick](0.2,3.8055)--(-0.2,3.8055) node[left]{$q_{3}$};
\draw [very thick](3.4772,2.9)--(6.0835,0);
\draw [very thick](1.5,2.2)--(3.4772,0);
\draw [very thick](9.5036,0)--(6.0835,3.8055);
\draw [ultra thin, dashdotted](1.5,0) -- (1.5,2.2);
\draw [ultra thin, dashdotted](3.4772,0) -- (3.4772,2.9);
\draw [ultra thin, dashdotted](6.0835,0) -- (6.0835,3.8055);
\draw[decorate,decoration={brace,amplitude=8pt}] (1.5,-0.2) -- (0,-0.2) node[midway, below,yshift=-1.8ex]{$t_{p1}(q_{1})$};
\draw[decorate,decoration={brace,amplitude=8pt}] (3.4772,-0.2) -- (1.5,-0.2) node[midway, below,yshift=-1.8ex]{$t_{p1}(q_{2})$};
\draw[decorate,decoration={brace,amplitude=8pt}] (6.0835,-0.2) -- (3.4772,-0.2) node[midway, below,yshift=-1.8ex]{$t_{p1}(q_{3})$};
\draw[decorate,decoration={brace,amplitude=8pt}] (3.4772,-1.5) -- (1.5,-1.5) node[midway, below,yshift=-1.8ex]{$t_{p1}(q_{2})$};
\draw[decorate,decoration={brace,amplitude=8pt}] (6.0835,-1.5) -- (3.4772,-1.5) node[midway, below,yshift=-1.8ex]{$t_{p2}(q_{2})$};
\draw[decorate,decoration={brace,amplitude=8pt}] (9.5036,-1.5) -- (6.0835,-1.5) node[midway, below,yshift=-1.8ex]{$t_{p2}(q_{3})$};
\end{tikzpicture}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Attachments
WeChat Image_20200601172616.png
WeChat Image_20200601172616.png (62.56 KiB) Viewed 11669 times
t Image_20200601154138.png
t Image_20200601154138.png (88.37 KiB) Viewed 11675 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Tikz Chart Arrows

Post by Bartman »

Please provide a complete example and use the BBCode to highlight your source code.

A suggestion:

Code: Select all

Code, edit and compile here:
\documentclass[border=5pt]{standalone}
\usepackage{tikz}% pgfplots loads tikz, which loads graphicx
\usetikzlibrary{shapes,arrows.meta,positioning,matrix}
\tikzset{>=Stealth}
\begin{document}
\begin{tikzpicture}[
thick,
box/.style={
draw,
text width=6em,
align=center,
minimum height=1cm
}
]
\begin{scope}[nodes=box, node distance=.5cm and 2cm]
\node (man) {Manufacturer};
\node (re1) [above right=of man] {Retailer 1};
\node (re2) [below right=of man] {Retailer 2};
\node (cus) [below right=of re1] {Customers};
\end{scope}
% arrows
\draw [->,dashed]
(re1) --+ (0,1.5) node [above] (a1) {$a_1$}
;
\draw [->,dashed]
(re2) --+ (0,-1.5) node [below] (a2) {$a_2$}
;
% legend
\matrix [
matrix of nodes,
draw,
anchor=east,
inner ysep=1.5pt,
nodes={anchor=west},
nodes in empty cells,
column 1/.style={minimum width=8mm}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
nerazzurri53
Posts: 2
Joined: Mon Jun 01, 2020 3:37 pm

Tikz Chart Arrows

Post by nerazzurri53 »

Hi Bartman,

thank you for the prompt answer!
Could you pls explain what the 'yshift' and east mean?
and: out=70, in=130, looseness=1.5, what do they stand for?
Sorry i am completely new about Latex.
Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Tikz Chart Arrows

Post by Bartman »

You will find descriptions and examples of everything in the manual of pgf/TikZ. In my opinion, the yshift option is self-explanatory. east is an anchor name. The options out, in and looseness are used in different contexts, in this case with the edge operation.
Post Reply