2

I'd like to draw a picture similar to the hand-drawn one below:

wanted

With labels $0$, $1$, $\Psi_{L,S}$, $a_1$, $\ell_i + 2\varepsilon$, $\Psi_{L,H}$, $b_1$, $-\varepsilon$, $1 + \varepsilon$, $\Psi_{L,S}$, $a_2$, $b_N : \mathbb{N}^{*} \setminus \mathbb{N}$, $-t$, $t + 1$, and $\Psi_{L,H}$.

All three of the dashed line figures should look the same as

wanted2

without the numerical labels, but with the respective endpoint labels.

To draw the second figure, refer to an older post: How to plot a bar graph of decaying values?

The lengths are 1/3, 1/9, 1/9, 1/27, 1/27, 1/27, and 1/27.

Any succinct code would be most appreciated.

  • 4
    Please at least provide some code rather than just posting pictures and expecting other people to do everything from scratch. In this case, for example, you could at least post the code for the second figure modified with the lengths you specify. I am not saying that no knight in shining armour will come along. I am saying that it would be minimally decent to at least demonstrate some effort in light of the help you have already received. – cfr Mar 23 '14 at 20:15
  • @cfr Well I'm not really sure even where to begin – Anthony Peter Mar 23 '14 at 20:18
  • Sorry? Part of the picture is the subject of the earlier question you linked to. So you can surely provide the code for that part of it, adapting it to use the lengths you desire. You could also show some attempt at at least a basic set up - even if all you do is provide the document framework and draw a few lines. Given your previous questions, you should know 'where to begin' even if you do not know what to do after that. Arrows and straight lines are among the easiest things to draw with tikz. So easy that even I have been known to manage them. Have you made any effort at all? – cfr Mar 23 '14 at 20:26
2

One option:

\documentclass{article}
\usepackage{amssymb}
\usepackage{tikz}

\newlength\mylen
\setlength\mylen{3pt}

\newcommand\Mdot{%
  \hspace*{2pt}\rule{1pt}{.4pt}\hspace*{2pt}}
\newcommand\Mrule[1]{\rule{#1}{0.4pt}}
\newcommand\MDot{\Mdot\Mrule{\mylen}\Mdot}
\newcommand\MSet{%
  \rule[-4pt]{.4pt}{8pt}%
  \MDot\Mrule{3\mylen}%
  \MDot\Mrule{9\mylen}%
  \MDot\Mrule{27\mylen}%
  \MDot\Mrule{9\mylen}%
  \MDot\Mrule{3\mylen}%
  \MDot%
  \rule[-4pt]{.4pt}{8pt}%
}

\begin{document}

\begin{tikzpicture}
\node[inner sep=0pt,anchor=west] (topset)
  {\MSet};
\node at ([yshift=-10pt]topset.west) {$0$};  
\node at ([yshift=-10pt]topset.east) {$1$};
\node at ([yshift=-25pt]topset.east) {$\Psi_{L,H}$};
\begin{scope}[yshift=-3cm]
\foreach \Pos/\Len in {0/3cm,1/2cm,2/2cm,3/1cm,4/1cm,5/1cm,6/1cm}
  \draw[|-|] (\Pos,0) -- ++(0,-\Len); 
\node at (6.8cm,-0.5cm) {$\dots$};
\end{scope}   
\begin{scope}[yshift=-9cm]
\node[inner sep=0pt,anchor=west] (middleset)
  {\MSet};
\node at ([yshift=-10pt]middleset.west) {$-\varepsilon$};  
\node at ([yshift=-10pt]middleset.east) {$1+\varepsilon$};
\node at ([yshift=-25pt]middleset.east) {$\Psi_{L,H}$};
\end{scope}
\begin{scope}[yshift=-14cm]
\node[inner sep=0pt,anchor=west] (bottomset)
  {\MSet};
\node at ([yshift=-10pt]bottomset.west) {$-t$};  
\node at ([yshift=-10pt]bottomset.east) {$t+1$};
\node at ([yshift=-25pt]bottomset.east) {$\Psi_{L,H}$};
\end{scope}

\draw[->] 
  ([yshift=-1cm]topset.center) -- node[right] {$a_{1}$} ++(0,-1cm);
\node at 
  ([yshift=2.5cm]middleset.center) {$\ell +2\varepsilon$};
\draw[->] 
  ([yshift=2cm]middleset.center) -- node[right] {$b_{1}$} ++(0,-1cm);
\draw[->] 
  ([yshift=-1cm]middleset.center) -- node[right] {$a_{2}$} ++(0,-1cm);
\node[rotate=90] at ([yshift=-2.5cm]middleset.center) {$\dots$};  
\draw[->] 
  ([yshift=-3cm]middleset.center) -- node[right] {$b_{N}:N\in\mathbb{N}\sp{\ast}\setminus\mathbb{N}$} ++(0,-1cm);
\end{tikzpicture}

\end{document}

enter image description here

  • My apologies, I was hoping to add an ellipsis to the right of the decaying bar graph. As for the labels, how would I insert them? – Anthony Peter Mar 24 '14 at 0:49
  • @AnthonyPeter tell me the exact position for the labels and I can place them. – Gonzalo Medina Mar 24 '14 at 0:54
  • All Psi labels should be right flushed under each, the ell + epsilon should be centered – Anthony Peter Mar 24 '14 at 0:56
  • @AnthonyPeter please see my updated answer. – Gonzalo Medina Mar 24 '14 at 1:04
1

Same idea as @Gonzalo, slightly different implementation, and with labels and the ellipsis.

\documentclass{standalone}

\usepackage{tikz,amssymb}
\usetikzlibrary{calc}

\begin{document}

\begin{tikzpicture}
%% Horizontal sections
% Bottom section
\node (-t) at (0,0) {$-t$};
\node (t1) at (6,0) {$t+1$};
\draw (0,.3)--(0,.8) (6,.3)--(6,.8);
\draw (.1,.55)--(5.9,.55);
\foreach \x in {.15,.55,1.25,1.65}{
  \draw[fill=black,draw=white,line width=2pt] (\x,.55) circle (.05);
  \draw[fill=black,draw=white,line width=2pt] (6-\x,.55) circle (.05);
}
\node at (5,-.5) {$\psi_{L,S}$};
% First middle section
\begin{scope}[shift={(0,4.5)}]
\node (-e) at (0,0) {$-\varepsilon$};
\node (e1) at (6,0) {$\varepsilon+1$};
\draw (0,.3)--(0,.8) (6,.3)--(6,.8);
\draw (.1,.55)--(5.9,.55);
\foreach \x in {.15,.55,1.25,1.65}{
  \draw[fill=black,draw=white,line width=2pt] (\x,.55) circle (.05);
  \draw[fill=black,draw=white,line width=2pt] (6-\x,.55) circle (.05);
}
\node at (5,-.5) {$\psi_{L,S}$};
\end{scope}
% Second middle section
\begin{scope}[shift={(0,10)}]
\draw[|-|] (0,0)--(0,-2.5);
\draw[|-|] (.5,0)--(.5,-1.25);
\draw[|-|] (1,0)--(1,-1.25);
\draw[|-|] (1.5,0)--(1.5,-.625);
\draw[|-|] (2,0)--(2,-.625);
\draw[|-|] (2.5,0)--(2.5,-.625);
\draw[|-|] (3,0)--(3,-.625);
\node at (3.5,-.3125) {$\cdots$};
\node at (5,-1.3) {$\psi_{L,H}$};
\node at (1,-2.5) {$\varphi + 2\varepsilon$};
\coordinate (b0) at (0,0);
\coordinate (b1) at (6,0);
\end{scope}
% Top 
\begin{scope}[shift={(0,12)}]
\node (0) at (0,0) {0};
\node (1) at (6,0) {1};
\draw (0,.3)--(0,.8) (6,.3)--(6,.8);
\draw (.1,.55)--(5.9,.55);
\foreach \x in {.15,.55,1.25,1.65}{
  \draw[fill=black,draw=white,line width=2pt] (\x,.55) circle (.05);
  \draw[fill=black,draw=white,line width=2pt] (6-\x,.55) circle (.05);
}
\node at (5,-.5) {$\psi_{L,S}$};
\end{scope}
%% Arrows
\draw[->,shorten >=.5cm] ($(0)!.5!(1)$) to node[right=5pt,pos=.45] {$a_1$} ($(b0)!.5!(b1)$);
\draw[->,shorten <=3cm,shorten >=1cm] ($(b0)!.5!(b1)$) to node[right=5pt,pos=.7] {$b_1$} ($(-e)!.5!(e1)$);
\draw[->] ($(-e)!.5!(e1)$) to node[right=5pt] {$a_2$} +(270:1.2);
\node at ($($(-e)!.5!(e1)$)!.33!($(-t)!.5!(t1)$)$) {$\vdots$};
\draw[->] ($($(-e)!.5!(e1)$)+(270:2)$) to node[right=5pt] {$b_N; N\in \mathbb N^*\setminus\mathbb N'$} +(270:1.2);
\end{tikzpicture}

\end{document}

Looks like this:

enter image description here

Quick edit: Changed the dashed line to an ellipsis and adjusted the positioning.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.