I am plotting three lists of different size on the same plot. I want the plot to start from zero rather than 1 on the x-axis. In the past, I have used DataRange->{0,Max}
to achieve this, but in this case the data range of all lists is changed, which is not what I want.
For example, consider:
a = {1, 2, 3};
b = {2, 3, 4, 5, 6};
c = {3, 4, 5, 6, 7, 8, 9, 10};
ListLogPlot[{a, b, c}, Joined -> True, PlotLegends -> {"a", "b", "c"}]
which yields:
If I add in the DataRange requirement,
ListLogPlot[{a, b, c}, Joined -> True, PlotMarkers -> {"a", "b", "c"}, PlotLegends -> {"a", "b", "c"}, DataRange -> {0, 7}]
,
I get the following plot, where all my lists are stretched to span the range 0->7:
I want each list to start at zero, but preserve its range (so 0->2 for a, 0-> 4 for b, etc. ). I am plotting them all together rather than creating different plots because I need the legend.
Transpose[{Range[0, Length[a]-1], a}]
and so on. $\endgroup$