Good that you provide code, though to make it easier to help there are a few things you could think about in the future.
What you provide is not really an MWE (minimal working example) as it is neither minimal nor working in the provided state.
A minimal example is nice since it reduces the surface area for the problem, and it is easier for people to get an understanding what the involved parts are. Here I’m not sure if the problems could be the PlotThemes package, the Plots package, or maybe something with LaTexStrings? Or maybe it is even something with DifferentialEquations, though that seems less plausible.
A working example is obviously easier to try out, not having to figure out what kind of things you are plotting and if it needs to be some specific data for the problem to occur. I can’t just try to run this code as it does not provide the sol
to be plotted.
It is also nicer to use the code blocks (preformatted text in the discourse ui) instead of blockquotes as it makes it easier to read and also makes the code more friendly to copy. Currently the quotation marks are replaced with fancy non-programming ones when I copy the code, and I have to replace them to be able to run anything.
Hope that didn’t come off as whiny, just want to help people get better help
For this case it wasn’t too hard to just remove some stuff and make up some data, so here is something I would consider a better MWE running on Julia 1.9.1 using Plots v1.38.15
julia> using Plots
julia> plot(0:0.01:3, [sin, cos])
julia> plot!(plot_title="XYZ", legendposition=:bottomleft, legend_column=2)
Removing the plot_title
or legend_column
removes the problem, removing legendposition
moves the extra line to a different position. Plotting and setting the values in the same call does not show the problem, so it is something with doing it in two steps that causes it.
With that said, I don’t really know the internals of Plots so I don’t really have much more help to give
But it seems like a bug to me, so you could check the issues on github and add it if you can’t already find it there.