2 Attachment(s)
How to Change Curve Color when it out of scale
How to change the curve color when the curve data out of the scale.
e.g. I want the curve scale is 0-150, but some data of the curve is above 150 so I want it show from left again. like this:
Attachment 9162
But Right now I just can plot like this:
Attachment 9163
I have no idea on how to change the color of part of the curve and to show the over range part like the first pic. I tried to set the CurveFilter , but it doesn't work! Do you have any ideas? Thank you!!
Re: How to Change Curve Color when it out of scale
What colors do you want to modify:
- the fill color above/below a reference value
- the line color above/below a reference value
Uwe
2 Attachment(s)
Re: How to Change Curve Color when it out of scale
I want to change the line color first.
Because I still on the step to show all the curves ,
the plan is going to add the fill function in the future.
And another problem is when the curve data out of scale range, which will draws back, not smoothly ,
like this:
Attachment 9167
I want it just draw the over range part. Like the picture I show you in the post,
but I got a idea to inherit another curve class to do it .
With your great help (yours QWT lib), this is my project now:
Attachment 9166
Re: How to Change Curve Color when it out of scale
These screenshots look very, very much like a plot I have written recently used in the drilling industry.
I derived from QwtPlotCurve and implemented its individual scale as legend item. Then I had a special legend, where the user can resize and move each scale individually. This way it is possible to arrange plots with many scales.
Usually the user is interested to see trends - the exact value is of less importance. That's why there is a mode I have called "wrapping", mapping a point modulo into the scale range. F.e for a scale of 100-200 a value of 310 would be mapped to 110. As my plot has to support QwtPlotCurve::Steps amd QwtPlotCurve::Lines I had to overload and reimplement both corresponding methods.
If you want to do the same I strongly recommend to use Qwt 6.1: because of experiences with this project I introduced QwtPointMapper to avoid, that you have to copy much code for this type of specialization. Also the legend system is much more flexible.
Uwe
Re: How to Change Curve Color when it out of scale
Thanks for your reply.
I am writing a program for wire line logging industry. It is a part of oil industry.
I am a engineer of wire line logging , not a programmer, so it is a big challenge for me.
Thanks for your good help.
I will follow your idea to my project.
Re: How to Change Curve Color when it out of scale
My application is also linked to the oil industry - this type of plots seems to be common in this area. Maybe I should do an example showing how to do it ...
Uwe
Re: How to Change Curve Color when it out of scale
That is a real good news for us!!
Waiting for your news!!
Re: How to Change Curve Color when it out of scale
Sorry this was not meant as that you can wait for seeing some code soon.
Uwe
Re: How to Change Curve Color when it out of scale
Got it.
I just want to show you how expect I am.
I will keep learning the qwt lib.
Thank you again.
Re: How to Change Curve Color when it out of scale
Hi all ,I am very interested in this problem. Could you share some code or more details?
Re: How to Change Curve Color when it out of scale
My implementation is working together with a closed source application, but I'm allowed to strip down the plotting part to something I can show as a Qwt example. This will happen somehow in the next weeks.
Uwe
Re: How to Change Curve Color when it out of scale
Quote:
Originally Posted by
Uwe
My implementation is working together with a closed source application, but I'm allowed to strip down the plotting part to something I can show as a Qwt example. This will happen somehow in the next weeks.
Uwe
Thank you very much. I can't wait to read that. Is it possible to see it before August ?
Re: How to Change Curve Color when it out of scale
Quote:
Originally Posted by
Uwe
These screenshots look very, very much like a plot I have written recently used in the drilling industry.
I derived from QwtPlotCurve and implemented its individual scale as legend item. Then I had a special legend, where the user can resize and move each scale individually. This way it is possible to arrange plots with many scales.
Usually the user is interested to see trends - the exact value is of less importance. That's why there is a mode I have called "wrapping", mapping a point modulo into the scale range. F.e for a scale of 100-200 a value of 310 would be mapped to 110. As my plot has to support QwtPlotCurve::Steps amd QwtPlotCurve::Lines I had to overload and reimplement both corresponding methods.
If you want to do the same I strongly recommend to use Qwt 6.1: because of experiences with this project I introduced QwtPointMapper to avoid, that you have to copy much code for this type of specialization. Also the legend system is much more flexible.
Uwe
That will be a good example which demostrates how powerful the QWT it is! +1
Thank Uwe in advance!