Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm plotting multiple lists with ListPlot[] or ListLogPlot[]:

ListLogPlot[{ListA, ListB, ListC, ListD, ListE}, PlotRange -> {{0, 100}, Automatic}]

I also have fits, $(f_a,f_b,f_c,f_d,f_e)$ for the data in each of the lists. How can I overlay the fits in the same color and for the same $(x,y)$ range?

share|improve this question
Could you post a minimal example ? – b.gatessucks May 5 '13 at 11:41

1 Answer 1

up vote 1 down vote accepted

Create some data:

data = Map[Sin[# Range@100] + # &, {1, 5, 3, 6}] // N;

Create some fits:

fits = LinearModelFit[#, g, g] & /@ data;

Plot the data:

g1 = ListLogPlot[data, PlotRange -> {{0, 100}, Automatic}, Joined -> True];

Plot the fits:

g2 = ListLinePlot[Log@Thread[#[Range[0, 100]]]& /@ fits, PlotRange->{{0, 100},Automatic}]

Combine the plots:


enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.