Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 2.99 KB | None | 0 0
  1. \begin{figure}
  2.        \centering
  3.        \begin{tikzpicture}
  4.    \draw[gray!50, thin, step=0.5] (-1,-1) grid (7.5,7.5);
  5.    \draw[very thick,->] (-1,0) -- (7.5,0) node[right] {$x_1$};
  6.    \draw[very thick,->] (0,-1) -- (0,7.5) node[above] {$x_2$};
  7.  
  8.    \draw (0,0.2) -- (0,-0.2) node[below,right] {0};
  9.    \draw (3.5,0.2) -- (3.5,-0.2) node[below] {0.5};
  10.    \draw (7,0.2) -- (7,-0.2) node[below,left] {1};
  11.    \draw (0.2,3.5) -- (-0.2,3.5) node[left] {0.5};
  12.    \draw (0.2,7) -- (-0.2,7) node[left] {1};
  13.  
  14.    \fill[blue!50!cyan,opacity=0.5] (0,0) -- (7,3.5) -- (7,7) -- (0,3.5) -- cycle;
  15.    \fill[gray!50!cyan,opacity=0.2] (0,0) -- (3.5,0) -- (7,3.5) -- cycle;
  16.    \fill[gray!50!cyan,opacity=0.2] (7,7) -- (3.5,7) -- (0,3.5) -- cycle;
  17.  
  18.    \node[draw,circle,fill=black,minimum size=0.2cm,inner sep=0] at (0,0) {};
  19.    \node[draw,circle,fill=black,minimum size=0.2cm,inner sep=0] at (7,0) {};
  20.    \node[draw,circle,fill=black,minimum size=0.2cm,inner sep=0] at (7,7) {};
  21.    \node[draw,circle,fill=black,minimum size=0.2cm,inner sep=0] at (0,7) {};
  22.     \draw (-1,-0.5) -- (7.5,3.75);
  23.     \draw (7,-1) --  (7,7.5);
  24.     \draw (7.5,7.25) --  (-1,3);
  25.     \draw (0,0) -- (0,3.5);
  26.     %\draw (1,-3) -- (3,1) -- node[below left,sloped] {\tiny$2x_1-x_2\leq5$} (4.5,4);
  27.     %\draw (-1,1) -- node[above,sloped] {\tiny$-x_1+2x_2\leq3$} (5,4);
  28.  
  29.     \end{tikzpicture}
  30.        \caption{$BCC_1(K)$}
  31.        \label{fig:my_label}
  32.    \end{figure}
  33.    
  34.    \begin{figure}
  35.        \centering
  36.        \begin{tikzpicture}
  37.    \draw[gray!50, thin, step=0.5] (-1,-1) grid (7.5,7.5);
  38.    \draw[very thick,->] (-1,0) -- (7.5,0) node[right] {$x_1$};
  39.    \draw[very thick,->] (0,-1) -- (0,7.5) node[above] {$x_2$};
  40.  
  41.    \draw (0,0.2) -- (0,-0.2) node[below,right] {0};
  42.    \draw (3.5,0.2) -- (3.5,-0.2) node[below] {0.5};
  43.    \draw (7,0.2) -- (7,-0.2) node[below,left] {1};
  44.    \draw (0.2,3.5) -- (-0.2,3.5) node[left] {0.5};
  45.    \draw (0.2,7) -- (-0.2,7) node[left] {1};
  46.  
  47.    \fill[blue!50!cyan,opacity=0.5] (0,0) -- (2.333333,4.666666) -- (7,7) -- (4.666666,2.333333) -- cycle;
  48.    \fill[gray!50!cyan,opacity=0.2] (0,0) -- (3.5,0) -- (7,3.5) -- (7,7) -- (4.666666,2.333333) -- cycle;
  49.    \fill[gray!50!cyan,opacity=0.2] (7,7) -- (3.5,7) -- (0,3.5) -- (0,0) -- (2.333333,4.666666) -- cycle;
  50.  
  51.    \node[draw,circle,fill=black,minimum size=0.2cm,inner sep=0] at (0,0) {};
  52.    \node[draw,circle,fill=black,minimum size=0.2cm,inner sep=0] at (7,0) {};
  53.    \node[draw,circle,fill=black,minimum size=0.2cm,inner sep=0] at (7,7) {};
  54.    \node[draw,circle,fill=black,minimum size=0.2cm,inner sep=0] at (0,7) {};
  55.     \draw (-1,-0.5) -- (7.5,3.75);
  56.     \draw (7,-1) --  (7,7.5);
  57.     \draw (7.5,7.25) --  (-1,3);
  58.     \draw (-0.5,-1) -- (3.75,7.5);
  59.     \draw (3,-1) -- (7.25,7.5);
  60.     %\draw (1,-3) -- (3,1) -- node[below left,sloped] {\tiny$2x_1-x_2\leq5$} (4.5,4);
  61.     %\draw (-1,1) -- node[above,sloped] {\tiny$-x_1+2x_2\leq3$} (5,4);
  62.  
  63.     \end{tikzpicture}
  64.        \caption{$LS(K)$}
  65.        \label{fig:my_label2}
  66.    \end{figure}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement