How to clear the curve in the Pttrend ?

If the length of Pttrend is 100,first I draw the curve full of Pttrend,now I only want to clear some data in the Pttrend,for example I only want to draw the curve whose length is 80,how to do?

I have never used that widget, but I am guessing you will have to track the data points yourself and massage what the Trend widget actually sees to behave the way you want. Basically providing a higher-level API to the widget.

sorry,I don’t understand what you say,can you tell me how to do step by step?

Step-by-step? No, I don’t think I will do that. ;)

Basically you need to manage your data yourself. Instead of trying to have the widget manage it for you. Then you can just keep the widget in-sync with the data you are managing.

oh,my god!

You need set another points number the same way as you draw PtTrend first time. Or zerro points to clear it. Or PtUnrealizeWidget() to delete it from the screen

PtSetArg( &arg, Pt_ARG_TREND_DATA, NULL, 0 );
PtSetResources( trend_widget_prt, 1, &arg );

That’s a unique reaction :slight_smile:

å