# Is it possible to recreate this image in LaTeX?

I'm trying to create a series of figures in the below format, and would like to see if there's a way to do this in latex instead of my current fiddly and time consuming method, which uses an external graphing program to create a pdf image that I simply load in to my latex document using a graphics package.

The central graph is a simple jpg, while the rest of the data used is in a dat file. All horizontal axes have the same values and dimensions, and likewise all vertical axes have the same values and dimensions.

Is it possible for latex to plot all this together in a format that matches the shown figure?

• Yes. pgfplots should be able to handle that easily. The groupplots library (part of pgfplots) might be useful. – Torbjørn T. Nov 2 '16 at 18:38
• @Werner could you please delete the image you added. By uploading my image in that manner stackexchange puts a creative commons licence on it, which I didn't want to do to my data, hence why I uploaded it offsite. – Ulysses Nov 2 '16 at 18:45
• I know this is off-topic, but doesn't uploading to imgur give them lots of license too? (TOS) – Matthew Leingang Nov 2 '16 at 19:23
• @Ulysses: Furthermore, I'm assuming you want to remove this image once you're satisfied that your question is answered. At that point, this question becomes useless (despite the current answer), because no-one would be able to view the output you want and with a title requesting to "recreate this image", it doesn't provide any value to future visitors. If this is the case, your question will most likely be subject to closure as being "unclear what is being asked". – Werner Nov 2 '16 at 19:30
• @Ulysses: See Delete uploaded image. – Werner Nov 2 '16 at 19:46

Proof of concept.

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\usepgfplotslibrary{groupplots}

\usepackage{filecontents}
\begin{filecontents*}{data.dat}
x y
0 1
2 1
3 3
4 5
5 2
6 1.5
7 1
8 0
\end{filecontents*}
\begin{document}
\begin{tikzpicture}
\begin{groupplot}[
group style={
group size=2 by 2,
vertical sep=0pt,
horizontal sep=0pt
},
width=8cm,height=8cm,
xmin=0,xmax=8,
ymin=0,ymax=8]

\nextgroupplot[
xtick pos=right,
ylabel=Something,
xlabel=Other]

\nextgroupplot[
width=3cm,height=8cm,
x post scale=-1,
ytick pos=right,
xtick=\empty,
xlabel=Intensity,
ylabel=Something]

\nextgroupplot[
height=3cm,width=8cm,
ytick=\empty,
ylabel=Intensity,
xlabel=Other]