Graphics, Figures & TablesLabel or Caption for tikZ picture

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Label or Caption for tikZ picture

Post by coachbennett1981 »

I searched the forum and saw some things on labeling nodes and such, but my question involves labeling a figure using \caption and \label feature which is used for normal figures in LaTex. Is there a way to label the figure below without using the node feature? I am writing a book this for a book and need to label alot of figures and wanted to know if there is something I am missing.

Code: Select all

\documentclass[12pt]{exam}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{calc,through,backgrounds}

\begin{document}
  \begin{tikzpicture}[scale=.5]
    \draw[<->,line width=1.5pt](-6,-3)--(5,0);
    \draw[<->,line width=1.5pt](-6,0)--(5,-3);
    \draw(-.5,-.8) node{$150^{\circ}$};
    \draw(-.6,-2) node{$\angle 2$};
    \filldraw[black](-.5,-1.50) circle(2pt);
  \end{tikzpicture}
\end{document}
Any help would be appreciated..

Best,
Nick
Last edited by coachbennett1981 on Fri Sep 24, 2010 12:37 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Label or Caption for tikZ picture

Post by localghost »

Somehow I can't comprehend the problem or I understand you wrong. Just put the tikzpicture into a simple figure environment and proceed as usual. Otherwise may I have clarification.


Best regards
Thorsten
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Re: Label or Caption for tikZ picture

Post by coachbennett1981 »

Didn't realize that it was that easy.. Thank you for you help in this matter.

Nick
Post Reply