pgfplots would be the more developed approach: look for symbolic coordinates in its manual.
Below I rearranged (refactored) your code step by step to show you one way to do it with plain tikz. Most parts should be understandable from the initial comment section. E.g. by introducing styles you both simplify your code AND can have consistent changes by just editing the self-defined style-options.
Please don't puzzle the commands \dmnd with their tikz-options dmnd: they are different things in their contexts. (You may want to use more sophisticated names.)
A speciality remains putting those diamond and square symbol nicely in the legend.
The legend I'd put as one node, with dedicated options, like line breaks (align= and \\). // The nodes text can be any valid LaTeX statement. Turned out both symbols should be raised a little, followed perhaps by some horizontal space.
If you'd use the (commented out) saveboxes, the symbols will be larger. However, both approaches still can have some vertical and horizontal find tuning from a typesetting point of view.
lgnd/.style={anchor=east,draw,align=left,inner sep=8pt}, ... \node[lgnd,yshift=38mm] at (X) { \raisebox{4.5pt}{\dmnd}\hspace{.7em}: Diamonds are \dots\\ \raisebox{4.5pt}{\sqrr}\hspace{.8em}: Other data };

% ~~~ REFACTORING ~~~~~~~~~~~~~~~~~~~ % % 1. some structured editing (indenting, comments etc.) % 2. keeping only libraries relevant here; changing arrow tips % 3. introducing shortcuts for long statements % 4. style shortcuts for diamond and square % 5. suggestion for legend // left trial with saveboxes as demo \documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{ % patterns, arrows.meta, % <<< % decorations.pathreplacing, % calc, % intersections, % through, % backgrounds, plotmarks } \usepackage{float} % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \newcommand\dmnd[0]{\pgfuseplotmark{diamond}} \newcommand\sqrr[0]{\pgfuseplotmark{square}} % ~~~ saveboxes ~~~~~~~~~~~~~ %\newsavebox\dbx %\newsavebox\sbx % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \begin{document} \begin{figure}[H] \centering \begin{tikzpicture}[ xscale=3,yscale=3, >={Stealth}, dmnd/.style={mark size=7pt,color=black}, sqrr/.style={mark size=4pt,color=magenta}, lgnd/.style={anchor=east,draw,align=left,inner sep=8pt}, ] % ~~~ axes ~~~~~~~~~~~~~~~~~~~~~~~~~~~ \draw [<->] (0,1.5) coordinate(Y) --(0,0) --(3,0) coordinate(X); % <<< better? % ~~~ data ~~~~~~~~~~~~~~~~~~~~~~~~~~ \node[dmnd] at (0.5,0.0931) {\dmnd}; \node[dmnd] at (1.5,0.2401) {\dmnd}; \node[dmnd] at (2.5,0.7857) {\dmnd}; \node[sqrr] at (0.5,0.1310) {\sqrr}; \node[sqrr] at (1.5,0.4881) {\sqrr}; \node[sqrr] at (2.5,0.3571) {\sqrr}; % ~~~ labels ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \node [below] at (0.5,0) {text 1}; \node [below] at (1.5,0) {text 2}; \node [below] at (2.5,0) {text 3}; % \node [left] at (0,3) {text}; \node [anchor=east] at (Y) {text}; % try anchors instead % ~~~ legend (one way to do and place it) ~~~~~~~~~~ % \sbox{\dbx}{\dmnd} % \sbox{\sbx}{\sqrr} % \node[lgnd] at (2.5,1.2) { % \raisebox{4.5pt}{\usebox{\dbx}}\hspace{.7em}: Diamonds are \dots\\ % \raisebox{4.5pt}{\usebox{\sbx}}\hspace{.8em}: Other data % }; \node[lgnd,yshift=38mm] at (X) { \raisebox{4.5pt}{\dmnd}\hspace{.7em}: Diamonds are \dots\\ \raisebox{4.5pt}{\sqrr}\hspace{.8em}: Other data }; \end{tikzpicture} \end{figure} \end{document}