[Interest] Plotting 2d line with color depending on value (like colormap)

Massimiliano Maini maxmaini at gmail.com
Thu Jun 21 16:20:33 CEST 2018


Thanks Uwe and Jason.

At the moment I'm using a 3rd party library (http://www.qcustomplot.com/):
very handy but doesn't seem to support what I need.
I was wondering if I the feature could be easily added as it is easily
doable in Qt (as in "there's a special QPen to do this") or not.
Looks like the answer is NO.

Regards,

On Thu, 21 Jun 2018 at 15:42, Jason H <jhihn at gmx.com> wrote:

> 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" <maxmaini at gmail.com>
> *To:* interest at qt-project.org
> *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
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180621/84815315/attachment.html>


More information about the Interest mailing list