Math & ScienceHow to insert plot symbols of line and scatter in the caption

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
chrstphr-yjs
Posts: 2
Joined: Thu May 23, 2024 6:39 pm

How to insert plot symbols of line and scatter in the caption

Post by chrstphr-yjs »

Hi all,

How can I insert something like
Snipaste_2024-05-23_17-43-10.png
Snipaste_2024-05-23_17-43-10.png (647 Bytes) Viewed 7091 times
in the caption? I now, can only find symbols for scatters.

Many thanks,
Chris

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
User avatar
Stefan Kottwitz
Site Admin
Posts: 10311
Joined: Mon Mar 10, 2008 9:44 pm

How to insert plot symbols of line and scatter in the caption

Post by Stefan Kottwitz »

Hi Chris,

welcome to the forum!

Perhaps post some code that explains the issue. For now, we don't even know what packages you are using for plotting or captions, and what scatter symbols you mean.

Best regards,

Stefan
LaTeX.org admin
chrstphr-yjs
Posts: 2
Joined: Thu May 23, 2024 6:39 pm

How to insert plot symbols of line and scatter in the caption

Post by chrstphr-yjs »

Stefan Kottwitz wrote:Hi Chris,

welcome to the forum!

Perhaps post some code that explains the issue. For now, we don't even know what packages you are using for plotting or captions, and what scatter symbols you mean.

Best regards,

Stefan

Code: Select all

\begin{figure}[H]
	\centering
	\includegraphics[width=0.8\textwidth]{chapter_3/figures/20230731-ConductanceAppCurve3-dless.png}
	\caption{The experimental (\textcolor{green}{\squadfill}) and simulated (\textcolor{red}{\squadfill})conductance approach curves compared with the theoretical negative feedback of a 25 \gm m\dm $R_g$ 5 electrode.}
	\label{secmcond}
\end{figure}
Hi Stefan,

So thats the figure Im trying to input. now, in the caption, I'm using \squadfill of different colours to explain my figure. but what I really need is a square with a horizental line across it as shown in the picture I attached. \squadfill is from package{oplotsymbl}

Many thanks,
Chris
User avatar
Stefan Kottwitz
Site Admin
Posts: 10311
Joined: Mon Mar 10, 2008 9:44 pm

How to insert plot symbols of line and scatter in the caption

Post by Stefan Kottwitz »

Hi Chris,

here's a \scatter macro that you can use:

Code: Select all

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{float}
\usepackage{oplotsymbl}
\newcommand{\scatter}[1]{%
  \raisebox{-0.8pt}{\textcolor{#1}{\rule[2.8pt]{10pt}{1.5pt}%
  \squadfill\rule[2.8pt]{10pt}{1.5pt}}}}
\begin{document}
\begin{figure}[H]
	\centering
	\includegraphics[width=0.8\textwidth]{diagram}
	\caption{The experimental (\scatter{green}) and simulated
	(\scatter{red}) conductance approach curves compared with the
	theoretical negative feedback of a 25 m$R_g$ 5 electrode.}
	\label{secmcond}
\end{figure}
\end{document}
scatter-plot-caption.png
scatter-plot-caption.png (14.31 KiB) Viewed 6948 times
For adjustments, you can look at the \rule and \raisebox reference.

Stefan
LaTeX.org admin
Post Reply