本文整理汇总了C++中Series::SetColor方法的典型用法代码示例。如果您正苦于以下问题:C++ Series::SetColor方法的具体用法?C++ Series::SetColor怎么用?C++ Series::SetColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Series
的用法示例。
在下文中一共展示了Series::SetColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Plot
// plot a new curve, if a figure of the specified figure name already exists,
// the curve will be plot on that figure; if not, a new figure will be created.
void PlotManager::Plot(const string figure_name, const float *p, int count, int step,
int R, int G, int B)
{
if (count < 1)
return;
if (step <= 0)
step = 1;
// copy data and create a series format.
float *data_copy = new float[count];
for (int i = 0; i < count; i++)
*(data_copy + i) = *(p + step * i);
Series s;
s.SetData(count, data_copy);
if ((R > 0) || (G > 0) || (B > 0))
s.SetColor(R, G, B, false);
// search the named window and create one if none was found
active_figure = FindFigure(figure_name);
if ( active_figure == NULL)
{
Figure new_figure(figure_name);
figure_list.push_back(new_figure);
active_figure = FindFigure(figure_name);
if (active_figure == NULL)
exit(-1);
}
active_series = active_figure->Add(s);
active_figure->Show();
}