<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%% Plot the demonstration image and its histogram.
%
%% Copyright (C) 2019-2025 Mohammad Akhlaghi &lt;mohammad@akhlaghi.org&gt;
%
%% This file is free software: you can redistribute it and/or modify it
%% under the terms of the GNU General Public License as published by the
%% Free Software Foundation, either version 3 of the License, or (at your
%% option) any later version.
%
%% This file is distributed in the hope that it will be useful, but WITHOUT
%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
%% FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
%% for more details.
%
%% You should have received a copy of the GNU General Public License along
%% with this file.  If not, see &lt;http://www.gnu.org/licenses/&gt;.

\begin{tikzpicture}

  %% Dispaly the demo image.
  \node[anchor=south west] (img) at (0,0)
       {\includegraphics[width=0.5\linewidth]
         {tex/build/image-histogram/wfpc2.pdf}};

  %% Its label
  \node[anchor=south west] at (0.45\linewidth,0.45\linewidth)
       {\textcolor{white}{a}};

  %% This histogram.
  \begin{axis}[at={(0.52\linewidth,0.1\linewidth)},
      no markers,
      axis on top,
      xmode=normal,
      ymode=normal,
      yticklabels={},
      scale only axis,
      xlabel=Pixel value,
      width=0.5\linewidth,
      height=0.412\linewidth,
      enlarge y limits=false,
      enlarge x limits=false,
      ]
    \addplot [const plot mark mid, fill=red]
    table [x index=0, y index=1]
    {tex/build/to-publish/wfpc2-histogram.txt}
    \closedcycle;
  \end{axis}

  %% The histogram's label
  \node[anchor=south west] at (0.95\linewidth,0.45\linewidth) {b};
\end{tikzpicture}
</pre></body></html>