Browse Source

demos pgfplots, titlepage, article

master
parent
commit
804521d341
7 changed files with 226 additions and 0 deletions
  1. BIN
      demos/4-titlepage/logo-gray.jpg
  2. BIN
      demos/4-titlepage/logo.png
  3. +73
    -0
      demos/4-titlepage/main.tex
  4. +67
    -0
      demos/5-article/main.tex
  5. +7
    -0
      demos/6-pgfplots/data.csv
  6. +45
    -0
      demos/6-pgfplots/main.tex
  7. +34
    -0
      demos/6-pgfplots/scatter.tex

BIN
demos/4-titlepage/logo-gray.jpg View File

Before After
Width: 700  |  Height: 696  |  Size: 133 KiB

BIN
demos/4-titlepage/logo.png View File

Before After
Width: 800  |  Height: 600  |  Size: 37 KiB

+ 73
- 0
demos/4-titlepage/main.tex View File

@ -0,0 +1,73 @@
\documentclass[draft,twocolumn, fleqn]{article}
\setlength\parskip{0.3cm}
\usepackage{graphicx}
\newcommand{\myCommand}[2]{
This command supports two arguments #1 and #2.
}
\begin{document}
\begin{titlepage}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % Defines a new command for the horizontal lines, change thickness here
\center % Center everything on the page
%----------------------------------------------------------------------------------------
% HEADING SECTIONS
%----------------------------------------------------------------------------------------
\textsc{\LARGE Instituto Tecnológico de Morelia}\\[1.5cm] % Name of your university/college
\textsc{\Large División de Estudios de Posgrado}\\[0.5cm] % Major heading such as course name
\textsc{\large Ingeniería Y}\\[0.5cm] % Minor heading such as course title
%----------------------------------------------------------------------------------------
% TITLE SECTION
%----------------------------------------------------------------------------------------
\HRule \\[0.4cm]
{ \huge \bfseries Reporte de Práctica X}\\[0.4cm] % Title of your document
\HRule \\[1.5cm]
%----------------------------------------------------------------------------------------
% AUTHOR SECTION
%----------------------------------------------------------------------------------------
\emph{Alumno:}\\
Gerardo Marx \textsc{Chávez-Campos} % Your name
\emph{Profesor:} \\
Dr. James \textsc{Brown} % Supervisor's Name
\\[2cm]
% Fecha
{\large \today}\\[2cm] % Date, change the \today to a set date if you want to be precise
% LOGO SECTION
\includegraphics[width=6cm]{logo}\\[1cm] % Include a department/university logo - this will require the graphicx package
%----------------------------------------------------------------------------------------
\vfill % Fill the rest of the page with whitespace
\end{titlepage}
\myCommand{one}{two}
\section{Intro}
Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.
Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.Some text demo demo demo. Some text demo here.
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

+ 67
- 0
demos/5-article/main.tex View File

@ -0,0 +1,67 @@
\documentclass[draft,titlepage]{article}
\usepackage{lipsum}
\def\frontmatter{%
\pagenumbering{roman}
\setcounter{page}{1}
\renewcommand{\thesection}{\Roman{section}}
}%
\def\mainmatter{%
\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
\setcounter{section}{0}
\renewcommand{\thesection}{\arabic{section}}
}%
\def\backmatter{%
\setcounter{section}{0}
\renewcommand{\thesection}{\Alph{section}}
}%
\title{The title}
\author{Gerardo Marx Chávez Campos}
\begin{document}
\maketitle
\frontmatter
\section{Why Do This?}
\lipsum[1]
\section{Because I Can!}
\lipsum[2]
\newpage
\tableofcontents
\mainmatter
\section{See? It works!}
\lipsum[3]
\section{It's the best this way!}
\lipsum[4]
\backmatter
\section{And We Even Get Appendices!}
\lipsum[1]
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

+ 7
- 0
demos/6-pgfplots/data.csv View File

@ -0,0 +1,7 @@
time, voltaje, corriente
0,1,0.1
1,2,0.2
2,4,0.4
3,6,0.6
4,8,1.2
6,10,1.9

+ 45
- 0
demos/6-pgfplots/main.tex View File

@ -0,0 +1,45 @@
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.5.1}
\begin{document}
%1: latex as calculator
\begin{tikzpicture}
\begin{axis}
[xlabel=$x$,
ylabel=$f(x)$]
\addplot{x^2+4};
\end{axis}
\end{tikzpicture}
%2: coordinates
\begin{tikzpicture}
\begin{axis}
[xlabel=$x$,
ylabel=$f(x)$]
\addplot [color=black, mark=o, mark size=12pt]coordinates{
(0,0)
(1,2)};
\addlegendentry{Data}
\end{axis}
\end{tikzpicture}
%3: csv
\begin{tikzpicture}
\begin{axis}[
%legend style={draw =none},
legend pos = north west, % south west, south east, outer
legend columns = 2
]
\addplot table[x=time, y=voltaje, col sep=comma]{data.csv};
\addlegendentry{voltaje}
\addplot table[x=time, y=corriente, col sep=comma]{data.csv};
\addlegendentry{Corriente}
\end{axis}
\end{tikzpicture}
\end{document}

+ 34
- 0
demos/6-pgfplots/scatter.tex View File

@ -0,0 +1,34 @@
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.5.1}
\begin{document}
\begin{tikzpicture}
\begin{axis}[scatter/classes={
a={mark=square*,blue},%
b={mark=triangle*,red},%
c={mark=o,draw=black}}]
% \addplot[] is better than \addplot+[] here:
% it avoids scalings of the cycle list
\addplot[scatter,only marks,
scatter src=explicit symbolic]
coordinates {
(0.1,0.15) [a]
(0.45,0.27) [c]
(0.02,0.17) [a]
(0.06,0.1) [a]
(0.9,0.5) [b]
(0.5,0.3) [c]
(0.85,0.52) [b]
(0.12,0.05) [a]
(0.73,0.45) [b]
(0.53,0.25) [c]
(0.76,0.5) [b]
(0.55,0.32) [c]
};
\end{axis}
\end{tikzpicture}
\end{document}

Loading…
Cancel
Save