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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have similar question like mentioned at representing triplet data set with color on 2d plot but this time instead of color I need to represent variation of third axis with the thickness of the curve

share|improve this question
related – Kuba Apr 1 '14 at 16:47

Here Filling can be a big help.

Some sample data:

data = {#, Sin[#], #^2} & /@ Range[0, 10, 1/4];

A function to help create the variable "thickness". The parameter f is like a scaling factor:

addThickness[data_, f_] := 
  data /. {x_, y_, z_} :> {{x, y}, {x, y - f z}, {x, y + f z}}]

and now make the FillingStyle match the PlotStyle:

ListLinePlot[addThickness[data, 0.01], 
 Filling -> {2 -> {1}, 3 -> {1}}, PlotStyle -> Blue, 
 FillingStyle -> Opacity[1]]

enter image description here

share|improve this answer
How can I apply this method to list data like data = Table[{TL[[jj, 5]], TL[[jj, 6]], TL[[jj, 1]]}, {jj, 1, Length[TL]}]; – physicist Apr 1 '14 at 20:37
I have used the above code but it is not so useful because it is creating negative values of third variable which is not the part of data – physicist Apr 1 '14 at 21:39

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.