I am ploting electronic band structure in Mathematica using ListLinePlot
. Like this
However I don't want those vertical Lines indicated by red circle.
I want to delete those vertical lines and get this feel
An idea maybe to post-process the plot and keep styles intact. But I got lost in the complicated FullForm of Plot.
A simple example to start is for example ListLinePlot[{{1, 1}, {2, 1}, {2, 2}, {3, 2}}, Frame -> True]
ListLinePlot[ Split[{{1, 1}, {2, 1}, {2, 2}, {3, 2}}, First[#] != First[#2] &], Frame -> True]
? $\endgroup$ListLinePlot
. $\endgroup$ListLinePlot[{{1, 1}, {2, 1}, {2, 2}, {3, 2}}, Frame -> True] /. Line[x_] :> (Line /@ Split[x, First[#] != First[#2] &])
$\endgroup$