It's a simple mapping of y value to "H" in a HSV space over the normalized range of values.
 
To do it in a bitmap is easy, to do it as a line like you 'd want on a vector plot, i'd take the y midpoint value of the segment and use that for the pen color for the whole line, choosing a sensible number of points.
 
 
 
 
 
Sent: Thursday, June 21, 2018 at 5:51 AM
From: "Massimiliano Maini" <[email protected]>
To: [email protected]
Subject: [Interest] Plotting 2d line with color depending on value (like colormap)
Hi all,
 
I'd need to do something like this: https://imgur.com/MLAEuad
 
I have a set of (x,y,z) data points and want to plot them on a usual 2d plot ( x and y values), but with the line color depending on the z values (colormap).
 
How can this be achieved in Qt ?
 
Max.
 
 
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to