Latex Hilfe

Allgemein

Diese Seite fasst nützliche Code-Stücke für Latex zusammen.

Listen in Latex

Todo.

Graphen in Latex

\begin{figure}[h]
  \centering	
  \begin{tikzpicture}
  \begin{axis}[
  xmin=0, xmax = 24,
  height=16em, width=0.85\textwidth,
  enlarge y limits=0.2,
  xlabel={$Tageszeit$},
  ylabel={$P_{PV}$}, 
  legend style={at={(0.3,0.85)}},
  grid=major,
  legend entries={$pvPowerMeas$,$pvPowerMeasPoly$},		
  %restrict x to domain=0:5000
  ]
  \addplot [color=faumapv-blue-1,thick] table [x={timestamp}, y={pvPowerMeas}] {plots/fau_ma_pv_vorhersagesystem_20160910_day.dat};
  \addplot [color=faumapv-yellow-1,thick] table [x={timestamp}, y={pvPowerMeasPoly}] {plots/fau_ma_pv_vorhersagesystem_20160910_day.dat};
  \end{axis}
  \end{tikzpicture}
  \vspace{-10px}
  \caption{TODO}
  \label{fig:todo}
\end{figure}

Standardoptionen

xlabel=Lebensdauer $t$,
ylabel=Ausfallhäufigkeitssumme $R(t)$,
xmin=0, xmax = 99,
ymin=0, ymax=99,
domain=0.1:20,
minor tick num=5,
grid=both, % major and minor for both axis (alt: major, minor, none)
minor grid style={gray!25},
major grid style={black!50},

Einstellungen Grid

xtick={-4,-2,...,4},
minor xtick={-5,-3,...,5},
ytick={-4,-2,...,4},
minor ytick={-5,-3,...,5},
grid=both

Einstellungen Legende

legend style={at={(0.03,0.5)},anchor=west}
legend style={at={(axis cs:0.5,1)},anchor=south west}

legend pos=north east,
legend entries={$SoC_{Speicher}$},

Flächen markieren

\addplot[red!30]   fill between[of=lower and axis,soft clip={domain=-3:\verticalbar}];
\addplot[blue!30]  fill between[of=lower and axis,soft clip={domain=\verticalbar:20}];
\addplot[green!30] fill between[of=g6.5 and lower,soft clip={domain=-3:\verticalbar}];

\path[name path=axis] (axis cs:0,0) -- (axis cs:1,0);

    \addplot [
        thick,
        color=blue,
        fill=blue, 
        fill opacity=0.05
    ]
    fill between[
        of=f and axis,
        soft clip={domain=0:1},
    ];


Daten aus externe Tabelle laden

\addplot [black,very thick] table [x={eang}, y={disppos}] {\pistonkinetics};
\addplot [dashed,red,very thick] table [x={eang}, y={dispvel}] {\pistonkinetics};
\addplot [dashed,blue,very thick] table [x={eang}, y={dispacc}] {\pistonkinetics};

 

Todo.

Zeichnen in Latex

Todo.