Sunday, 11 August 2013

Axis font size in pgf plots when using a large set of data

Axis font size in pgf plots when using a large set of data

I am trying to plot a large set of data from a .dat file. The following is
my code. I can plot the data using this code. But, I am not able to
increase the size of the fonts used in the axis labels and title. I used I
am using texworks and I use Lualatex to compile the code since the data is
too large. Unfortunately, I am not able to attach the data file.
I am new to latex and pgfplots, any help would be appreciated.
\documentclass[landscape]{article}
\usepackage{tikz}
\usetikzlibrary{external}
\newenvironment{mytikz}{\begin{figure}[htp]
\centering
\begin{tikzpicture}}
{\end{tikzpicture}
\caption{}
\end{figure}}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{center}
\renewcommand{\PreviewBbAdjust}{0pt 0pt 0pt 0pt}
\usepackage[margin=0em]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\begin{document}
\begin{mytikz}
\begin{center}
\begin{tikzpicture}
\begin{axis}[
xlabel={Voltage ($V$)},
ylabel={Current ($A$)},
width=0.8\paperwidth, height=0.8\paperheight,]
\addplot [
color=black,
solid,
mark=diamond*,
mark options={red}]
table [col sep=comma]{Index_7_data_a.dat};
\addplot [
color=black,
solid,
mark=*,
mark options={blue}]
table [col sep=comma]{Index_7_data_b.dat};
\addplot [
color=black,
solid,
mark=pentagon*,
mark options={green}]
table [col sep=comma]{Index_7_data_c.dat};
%% Add a legend %%
\addlegendentry{$Phase A$};
\addlegendentry{$Phase B$};
\addlegendentry{$Phase C$};
\end{axis}
\end{tikzpicture}
\end{center}
\end{mytikz}
\end{document}

No comments:

Post a Comment