Hi,
i want to change the colour of a curve in a wxPlotCtrl.
I'm using this code:
wxPlotData* pdata = new wxPlotData(20);
wxPen mPen(*wxRED,1,wxSOLID);
pdata->SetPen(wxPLOTPEN_NORMAL, mPen);
for(int i=0;i!=20;++i)
{
pdata->SetXValue(i,(6.28/20)*i);
pdata->SetYValue(i,sin((6.28/20)*i));
}
m_plotCtrl1->AddCurve(pdata);
The curve is drawn, but alyways in blue ...
What´s wrong on my code ?
BR
Grieko
How to set the colour of a curve (wxPlotCtrl)?
Re: How to set the colour of a curve (wxPlotCtrl)?
Hello! When you add the curve you can deselect it. Yo should write:
and the curve will be RED.
Code: Select all
m_plotctrl1->AddCurve(pdata,false,false);