Making labeled subfigures is a bit tricky using the tikz
package. Could someone please show me how to provide each subfigure its own letter (A for the left subfigure, B for the middle figure, and C for the right subfigure)? The code is below:
\documentclass[aps,amsmath,amssymb,letter,scriptaddress,twocolumn, prl,showkeys]{revtex4}
\usepackage{amsmath}
\usepackage{amsthm}
\newtheorem{thm}{Theorem}
\usepackage{amssymb}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\usepackage{mathtools}
\usepackage{makeidx}
\usepackage{amsfonts}
\usepackage[ansinew]{inputenc}
\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{subfigure}
\usepackage{epsfig}
\usepackage{pst-grad} % For gradients
\usepackage{pst-plot} % For axes
\usepackage[colorlinks,hyperindex]{hyperref}
\makeatletter
\newcommand{\rmnum}[1]{\romannumeral #1}
\newcommand{\Rmnum}[1]{\expandafter\@slowromancap\romannumeral #1@}
\makeatother
\begin{document}
\begin{figure*}
\begin{tikzpicture}[font=\footnotesize\sffamily]
\begin{groupplot}[
group style={group size=3 by 1,
ylabels at=edge left
},
view={0}{90},
width=5cm,
height=5cm,
scale only axis,
xmin=0, xmax=3,
ymin=-8, ymax=0,
xlabel={x},
ylabel={$y$},
name=plot2,
unbounded coords=jump]
]
\nextgroupplot
\addplot [only marks, mark=o, color=red] table{
1 -2.5
2 -3.3
3 -3.4
};
\addplot [domain=1:3, color=black] {-0.0538*x-2.8234};
\nextgroupplot
\addplot [only marks, mark=o, color=red] table{
1 -2.900422094
2 -3.244193633
3 -3.283414346
};
\addplot [domain=4:6, color=black] {-0.0333*x-3.1637};
\nextgroupplot
\addplot [only marks, mark=o, color=red] table{
4 -4.199705078
5 -4.674163057
6 -4.674163057
};
\addplot [domain=4:6, color=black] {-0.0749*x-1.7959};
\end{groupplot}
\end{tikzpicture}
\caption{My caption}
\label{myfig}
\end{figure*}
\end{document}
Aucun commentaire:
Enregistrer un commentaire