当前位置: 首页>>代码示例>>C++>>正文


C++ Plotter::clear方法代码示例

本文整理汇总了C++中Plotter::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ Plotter::clear方法的具体用法?C++ Plotter::clear怎么用?C++ Plotter::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plotter的用法示例。


在下文中一共展示了Plotter::clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PlotAll

static void PlotAll (Scene& scene, Plotter& plotter)
{
  Vector x(1,steps), Pot(1,steps);
  for (int i = 1; i <= steps; i++) {
    x(i) = xmin + (i-1)*(xmax-xmin)/(steps-1);
    Pot(i) = V(x(i));
  }
  plotter.clear();
  double ymin = -1, ymax = min(6.0,max(1.0,Max(Pot))); // betwwen 1 and 6 !!
  plotter.axisframe(xmin,xmax,ymin,ymax, "x","V(x), Psi(x)");
  plotter.style(plotter.LINES);

  plotter.plot(x,Pot);			// potential
  scene.Line(xmin,ymin,xmin,ymax);
  scene.Line(xmax,ymin,xmax,ymax);

  scene.SetColor(ColorB(255,0,0));	// wave function
  plotter.plot(x,Psi);

  scene.SetColor(ColorB(0,0,255));	// eigen energy
  scene.Line(xmin,E,xmax,E);	
  scene.SetTextStyle(Standard);
  char label[60];
  sprintf(label,"E=%.8g",E);
  scene.Write(xmin+0.01,E+0.05,label);
}
开发者ID:lucafuji,项目名称:Gene-Correlation,代码行数:26,代码来源:shooting.cpp

示例2: backgroundIntro

//Function that prints names
bool backgroundIntro()
{
    ifstream data;
    POINT p;
    Plotter screen;
/*    HWND consoleWnd = GetConsoleWindow();*/

    Sleep(100);
    //PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\357mag.wav", NULL, SND_ASYNC);
    screen.setColor(yellow);
    screen.move(30,23);
    cout<<"Created By:";
    Sleep(2000);


    Sleep(100);
    //PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\357mag.wav", NULL, SND_ASYNC);
    screen.setColor(green);
    screen.move(30,25);
    cout<<"Abril Resendiz";
    Sleep(2000);


    // PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\357mag.wav", NULL, SND_ASYNC);
    screen.setColor(yellow);
    screen.move(30,27);
    cout<<"Daniel Holt";
    Sleep(2000);


  //  PlaySound("C:\\Users\\Alex\\Desktop\\CB\\ProjectFinal\\357mag.wav", NULL, SND_ASYNC);
    screen.setColor(green);
    screen.move(30,29);
    cout<<"Maggie Schmeltekopf";
    Sleep(2000);



    //  PlaySound("C:\\Users\\Alex\\Desktop\\CB\\ProjectFinal\\357mag.wav", NULL, SND_ASYNC);
    screen.setColor(yellow);
    screen.move(30,31);
    cout<<"Victoria Robinson";
    Sleep(2000);


    // PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\\357mag.wav", NULL, SND_ASYNC);
    screen.setColor(green);
    screen.move(30,33);
    cout<<"Emily Peirce";
    Sleep(2000);
    screen.clear();

    return exit;

}
开发者ID:maggieschmeltekopf,项目名称:1430groupproject,代码行数:56,代码来源:Picture.cpp


注:本文中的Plotter::clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。