# How to remove the squares through the legend markers in ListPlot?

I am drawing a plot with some legends. It seems the legend markers will always have squares in each line. My question is, is it possible to get rid of those squares through the legend markers? is there another way to do it?

Needs["PlotLegends"]
A = ( {
{-5, 0},
{-4, 1},
{-3, 1},
{-2, 0}
} );

X = ListLinePlot[A, PlotTheme -> "Scientific",
PlotStyle -> {Blue, Thickness[0.005], AbsoluteDashing},
PlotLegends ->
LineLegend[{"\!$$\*SubscriptBox[OverscriptBox[\(X$$, $$~$$], $$11\$$]\)= (-4,-3,1,1)"},
LegendMarkers -> {Blue, Thickness[0.005], AbsoluteDashing}],
AxesLabel -> {"x", "y"}];

Show[X,
PlotLabel ->
"Negative Fuzzy Solution \!$$\*OverscriptBox[\(X$$, $$~$$]\)",
PlotRange -> All]$$$$

• Remove LegendMarkers, you also need FrameLabel not AxesLabel. – yarchik Jun 16 '20 at 11:19

## 1 Answer

This seems working:

A = ({{-5, 0}, {-4, 1}, {-3, 1}, {-2, 0}});
X = ListLinePlot[A, PlotTheme -> "Scientific",  PlotStyle -> {Blue, Thickness[0.005], AbsoluteDashing},
PlotLegends ->
LineLegend[{"\!$$\*SubscriptBox[OverscriptBox[\(X$$, $$~$$], $$11$$]\)= (-4,-3,1,1)"}, Joined -> False,
LegendMarkers ->   Graphics[{Blue, Thickness[0.1], Line[{{-4, 0}, {4, 0}}]}],
LegendMarkerSize -> {50, 10}], AxesLabel -> {"x", "y"}];

Show[X, PlotLabel -> "Negative Fuzzy Solution \!$$\*OverscriptBox[\(X$$, $$~$$]\)", PlotRange -> All]