MATLAB: Is it possible gplot to have different line size, any help appreciated too

gplot;

Is it possible gplot to have different line size. Assume I have xyz table, while the xy columns of coordinates and z column is describe size of line. It should be noted that connection table (i.e 0 or 1) is available since is mandatory for gplot function. Looking any recent knowledge as well as any help appreciated too

Best Answer

No, that is not possible with gplot.
You could examine and modify the File Exchange Contribution that extends gplot to 3D, but you would need to modify it a fair bit.
gplot and the equivalent file exchange contribution work by building a single line with all of the coordinates, putting in NaN between the line segments as plot() and plot3() interpret NaN as indicating a break in drawing. The difficulty with this approach is that this generates a single lineseries() (or line() for sufficiently old versions), and each of those can only have a single color and style and width associated. In order to have different lines with different thicknesses, it would be necessary to plot them as distinct lines.
There are some approaches like looping using plot() for each item. There is another approach, which is that if you can put all of the data into a single 2D array then each column of Y will generate a distinct line; you can then set() the line width property of each line.
Related Question