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

  • $\begingroup$ related $\endgroup$
    – 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

  • $\begingroup$ 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]}]; $\endgroup$
    – physicist
    Apr 1 '14 at 20:37
  • $\begingroup$ 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 $\endgroup$
    – physicist
    Apr 1 '14 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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