book/src/graph1.tex
author Eugen Sawin <sawine@me73.com>
Fri, 25 Mar 2011 15:57:06 +0100
changeset 6 189c28168c97
permissions -rw-r--r--
Corrections.
sawine@1
     1
% GNUPLOT: LaTeX picture with Postscript
sawine@1
     2
\begingroup
sawine@1
     3
  \makeatletter
sawine@1
     4
  \providecommand\color[2][]{%
sawine@1
     5
    \GenericError{(gnuplot) \space\space\space\@spaces}{%
sawine@1
     6
      Package color not loaded in conjunction with
sawine@1
     7
      terminal option `colourtext'%
sawine@1
     8
    }{See the gnuplot documentation for explanation.%
sawine@1
     9
    }{Either use 'blacktext' in gnuplot or load the package
sawine@1
    10
      color.sty in LaTeX.}%
sawine@1
    11
    \renewcommand\color[2][]{}%
sawine@1
    12
  }%
sawine@1
    13
  \providecommand\includegraphics[2][]{%
sawine@1
    14
    \GenericError{(gnuplot) \space\space\space\@spaces}{%
sawine@1
    15
      Package graphicx or graphics not loaded%
sawine@1
    16
    }{See the gnuplot documentation for explanation.%
sawine@1
    17
    }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}%
sawine@1
    18
    \renewcommand\includegraphics[2][]{}%
sawine@1
    19
  }%
sawine@1
    20
  \providecommand\rotatebox[2]{#2}%
sawine@1
    21
  \@ifundefined{ifGPcolor}{%
sawine@1
    22
    \newif\ifGPcolor
sawine@1
    23
    \GPcolorfalse
sawine@1
    24
  }{}%
sawine@1
    25
  \@ifundefined{ifGPblacktext}{%
sawine@1
    26
    \newif\ifGPblacktext
sawine@1
    27
    \GPblacktexttrue
sawine@1
    28
  }{}%
sawine@1
    29
  % define a \g@addto@macro without @ in the name:
sawine@1
    30
  \let\gplgaddtomacro\g@addto@macro
sawine@1
    31
  % define empty templates for all commands taking text:
sawine@1
    32
  \gdef\gplbacktext{}%
sawine@1
    33
  \gdef\gplfronttext{}%
sawine@1
    34
  \makeatother
sawine@1
    35
  \ifGPblacktext
sawine@1
    36
    % no textcolor at all
sawine@1
    37
    \def\colorrgb#1{}%
sawine@1
    38
    \def\colorgray#1{}%
sawine@1
    39
  \else
sawine@1
    40
    % gray or color?
sawine@1
    41
    \ifGPcolor
sawine@1
    42
      \def\colorrgb#1{\color[rgb]{#1}}%
sawine@1
    43
      \def\colorgray#1{\color[gray]{#1}}%
sawine@1
    44
      \expandafter\def\csname LTw\endcsname{\color{white}}%
sawine@1
    45
      \expandafter\def\csname LTb\endcsname{\color{black}}%
sawine@1
    46
      \expandafter\def\csname LTa\endcsname{\color{black}}%
sawine@1
    47
      \expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}%
sawine@1
    48
      \expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}%
sawine@1
    49
      \expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}%
sawine@1
    50
      \expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}%
sawine@1
    51
      \expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}%
sawine@1
    52
      \expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}%
sawine@1
    53
      \expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}%
sawine@1
    54
      \expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}%
sawine@1
    55
      \expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}%
sawine@1
    56
    \else
sawine@1
    57
      % gray
sawine@1
    58
      \def\colorrgb#1{\color{black}}%
sawine@1
    59
      \def\colorgray#1{\color[gray]{#1}}%
sawine@1
    60
      \expandafter\def\csname LTw\endcsname{\color{white}}%
sawine@1
    61
      \expandafter\def\csname LTb\endcsname{\color{black}}%
sawine@1
    62
      \expandafter\def\csname LTa\endcsname{\color{black}}%
sawine@1
    63
      \expandafter\def\csname LT0\endcsname{\color{black}}%
sawine@1
    64
      \expandafter\def\csname LT1\endcsname{\color{black}}%
sawine@1
    65
      \expandafter\def\csname LT2\endcsname{\color{black}}%
sawine@1
    66
      \expandafter\def\csname LT3\endcsname{\color{black}}%
sawine@1
    67
      \expandafter\def\csname LT4\endcsname{\color{black}}%
sawine@1
    68
      \expandafter\def\csname LT5\endcsname{\color{black}}%
sawine@1
    69
      \expandafter\def\csname LT6\endcsname{\color{black}}%
sawine@1
    70
      \expandafter\def\csname LT7\endcsname{\color{black}}%
sawine@1
    71
      \expandafter\def\csname LT8\endcsname{\color{black}}%
sawine@1
    72
    \fi
sawine@1
    73
  \fi
sawine@1
    74
  \setlength{\unitlength}{0.0500bp}%
sawine@1
    75
  \begin{picture}(7200.00,5040.00)%
sawine@1
    76
    \gplgaddtomacro\gplbacktext{%
sawine@1
    77
      \csname LTb\endcsname%
sawine@1
    78
      \put(1342,704){\makebox(0,0)[r]{\strut{}$-10$}}%
sawine@1
    79
      \put(1342,1072){\makebox(0,0)[r]{\strut{}$0$}}%
sawine@1
    80
      \put(1342,1439){\makebox(0,0)[r]{\strut{}$10$}}%
sawine@1
    81
      \put(1342,1807){\makebox(0,0)[r]{\strut{}$20$}}%
sawine@1
    82
      \put(1342,2174){\makebox(0,0)[r]{\strut{}$30$}}%
sawine@1
    83
      \put(1342,2542){\makebox(0,0)[r]{\strut{}$40$}}%
sawine@1
    84
      \put(1342,2910){\makebox(0,0)[r]{\strut{}$50$}}%
sawine@1
    85
      \put(1342,3277){\makebox(0,0)[r]{\strut{}$60$}}%
sawine@1
    86
      \put(1342,3645){\makebox(0,0)[r]{\strut{}$70$}}%
sawine@1
    87
      \put(1342,4012){\makebox(0,0)[r]{\strut{}$80$}}%
sawine@1
    88
      \put(1342,4380){\makebox(0,0)[r]{\strut{}$90$}}%
sawine@1
    89
      \put(1474,484){\makebox(0,0){\strut{}$0$}}%
sawine@1
    90
      \put(2149,484){\makebox(0,0){\strut{}$2$}}%
sawine@1
    91
      \put(2823,484){\makebox(0,0){\strut{}$4$}}%
sawine@1
    92
      \put(3498,484){\makebox(0,0){\strut{}$6$}}%
sawine@1
    93
      \put(4172,484){\makebox(0,0){\strut{}$8$}}%
sawine@1
    94
      \put(4847,484){\makebox(0,0){\strut{}$10$}}%
sawine@1
    95
      \put(5521,484){\makebox(0,0){\strut{}$12$}}%
sawine@1
    96
      \put(6196,484){\makebox(0,0){\strut{}$14$}}%
sawine@1
    97
      \put(6870,484){\makebox(0,0){\strut{}$16$}}%
sawine@1
    98
      \put(440,2542){\rotatebox{90}{\makebox(0,0){\strut{}Voltage $V_p$ [V]}}}%
sawine@1
    99
      \put(4172,154){\makebox(0,0){\strut{}Resistance $R_0$ [$Omega$]}}%
sawine@1
   100
      \put(4172,4710){\makebox(0,0){\strut{}Graph 3: Dependence of $V_p$ on $R_0$}}%
sawine@1
   101
    }%
sawine@1
   102
    \gplgaddtomacro\gplfronttext{%
sawine@1
   103
      \csname LTb\endcsname%
sawine@1
   104
      \put(5883,4207){\makebox(0,0)[r]{\strut{}"cut_laldo.csv" using 1:2}}%
sawine@1
   105
    }%
sawine@1
   106
    \gplbacktext
sawine@1
   107
    \put(0,0){\includegraphics{graph1}}%
sawine@1
   108
    \gplfronttext
sawine@1
   109
  \end{picture}%
sawine@1
   110
\endgroup