In a ListLinePlot
I can set InterpolationOrder -> 0
to get the equivalent of gnuplot's steps
option, where the stepped line for each two points steps at the second point. Is there a Mma equivalent to gnuplot's fsteps
option, where the stepped line for each two points steps at the first point? (In tikz terminology, I want |-
instead of -|
to connect successive points.)
Example application: Verhulst diagrams.
Edit 1:
Answers to the question referenced by @MarcoB show that ListLinePlot
with InterpolationOrder->0
constructs a standard Manhatten path (alternating horizontal and vertical segments between points). This is equivalent to gnuplot's steps
option. I'm after the equivalent of gnuplot's fsteps
option: alternating vertical and horizontal segments.
To be clear: I am not asking how to produce this plot by creating new data through list manipulations. (See posts on cobweb plots with Mma for that.) I'm looking for built-in Mma functionality. (I accept that this may not exist.)
Edit 2:
logisticPath = NestList[2.75*#*(1 - #) &, 0.4, 10]
ListStepPlot[Transpose[{logisticPath, logisticPath}], "Left",
PlotRange -> All,
Prolog -> Line[{{0.4, 0.4}, {0.8, 0.8}}]]
Produces
This is almost right. I just need to get rid of that initial segment, which is outside the data. What I want looks like this (using the same data):
cobwebPoints = Partition[Riffle[logisticPath, logisticPath], 2, 1]
ListLinePlot[cobwebPoints, PlotRange -> All,
Prolog -> {Line[{{0, 0}, {1, 1}}]},
PlotRange -> All]
fsteps
behavior. Correct me if I'm wrong. $\endgroup$fsteps
behavior, at least as far as I understand what that behavior is. Take a look at my answer below, and let me know if I am misunderstanding. If, however, by "built-in MMA functionality" you mean an option toListLinePlot
, then the answer is in fact negative. However, you could just start considering Michael's helper functions "built-in" from now on :-) $\endgroup$ListStepPlot
. See thestep
argument, which can takeRight
,Left
andCenter
values. $\endgroup$