I’ll guess that you’re talking about Plots.jl, in which case I also guess that “leg” is short for legend and that hline disables legend anyway. You might try setting it to true in a separate plot command which may cause the legend to appear. The imaginary use case is you plot some data and want it to be labeled in a legend, and you add a horizontal or vertical line to the plot and don’t want it labeled like data. I’m speculating and haven’t tried it. Edit: revision
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Add line style to legend | 3 | 1352 | August 14, 2020 | |
| Legend covers the yaxis | 2 | 80 | November 7, 2024 | |
| Linestyles look the same in legend | 5 | 207 | December 29, 2024 | |
| Disable legend in AlgebraOfGraphics | 2 | 1028 | March 15, 2022 | |
| No legend using lines (and plots) | 2 | 180 | June 11, 2024 |