Graphics, Figures & Tables ⇒ Best Practice for Graphs
Best Practice for Graphs
Given my needs, what is simplest way to do this? I'm using Mac OS X if that is important. Is there a good "graphing" program I should download to create the graphs, and then export them to PDF or PNG?
The simpler the better, provided I can accomplish the goals listed above. Any thoughts are welcome.
Thanks in advance.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Best Practice for Graphs
-
torbjorn t.
- Posts: 162
- Joined: Wed Jun 17, 2009 10:18 pm
Re: Best Practice for Graphs
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Best Practice for Graphs
A short example with pgfplots. The output is attached.
Code: Select all
\documentclass[11pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{pgfplots}
\pgfplotsset{
compat=newest,
xlabel near ticks,
ylabel near ticks
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel={$x$ / rad},
ylabel={$\sin(x)$},
samples=100
]
\addplot[blue,smooth] {sin(deg(x))};
\addlegendentry{Sine curve};
\end{axis}
\end{tikzpicture}
\end{document}Thorsten
- Attachments
-
- qtmp.png (4.97 KiB) Viewed 4938 times
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10