Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/276.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Pchart-错误轴上的折线图_Php_Drupal_Graph_Pchart_Linegraph - Fatal编程技术网

Php Pchart-错误轴上的折线图

Php Pchart-错误轴上的折线图,php,drupal,graph,pchart,linegraph,Php,Drupal,Graph,Pchart,Linegraph,我正在尝试建立一个组合散点图和线图。目前散点图很好,当我添加线时,它们向右旋转90度,因此它们是垂直的,而不是水平的。我一辈子都不知道为什么,所以如果有人有任何建议,那就太棒了 下面的代码是完整的函数,现在忽略它的名称,而不是样条曲线图(我真的应该改变它) function cg_graphs_spline_plot($surgeonname、$plotpoint、$SingleTotal、$surgeonplots、$baseline、$gsettings){ /*建立二项曲线图*/ $bin

我正在尝试建立一个组合散点图和线图。目前散点图很好,当我添加线时,它们向右旋转90度,因此它们是垂直的,而不是水平的。我一辈子都不知道为什么,所以如果有人有任何建议,那就太棒了

下面的代码是完整的函数,现在忽略它的名称,而不是样条曲线图(我真的应该改变它)

function cg_graphs_spline_plot($surgeonname、$plotpoint、$SingleTotal、$surgeonplots、$baseline、$gsettings){
/*建立二项曲线图*/
$binomloop=$gsettings['maxmin'][0]['Max']+1;
对于($i=1;$i addPoints(array($plotpoint),“presurgenions”);//Y pos必须与X的pos匹配
$myData->addPoints(数组($nnotnullsingletotal),“pSurgeon”);//数组位置匹配,因此
foreach($surgeonplots['ops']作为$op){
$myData->addPoints($op,“外科医生”);
}
foreach($surgeonplots['reop']作为$reop){
$baselineplots[]=$baseline;
$myData->addPoints($reop,“reSurgeons”);
}
$myData->addPoints($baselineplots,“baseline”);//为线图添加基线
/**绘图二项式*/
$myData->addPoints($Ualert,“Ualert”);//添加上限警报
$myData->addPoints($Lalert,“Lalert”);//添加较低级别的警报
//$myData->addPoints($Ualarm,“Ualarm”);//添加上限报警
//$myData->addPoints($Lalarm,“Lalarm”);//添加较低的报警
/*创建X轴和绑定系列*/
$myData->setSerieOnAxis(“外科医生”,0);
$myData->setSerieOnAxis(“pSurgeon”,0);
$myData->setSerieOnAxis(“Ualert”,0);
$myData->setSerieOnAxis(“Lalert”,0);
$myData->setSerieOnAxis(“基线”,0);
$myData->setAxisName(0,$gsettings['axisXlabel']);//操作数--暂时删除
$myData->setAxisXY(0,轴X);
$myData->setAxisPosition(0,轴位置底部);
/*创建Y轴和绑定系列*/
$myData->setSerieOnAxis(“复活”,1);
$myData->setSerieOnAxis(“预设”,1);
$myData->setAxisName(1,$gsettings['axisYlabel']);
$myData->setAxisXY(1,轴Y);
$myData->setAxisUnit(1,“%”);
$myData->setAxisPosition(1,轴位置左);
/*创建所有散点图绑定*/
$myData->setScatterSerie(“外科医生”、“复活者”,0);
$myData->setScatterSerieDescription(0,“所有外科医生”);
$myData->setScatterSerieColor(0,数组(“R”=>255,“G”=>69,“B”=>0));
/*创建单个Surgions散射点*/
$myData->setScatterSerie(“pSurgeon”、“preSurgeons”,1);
$myData->setScatterSerieDescription(1$surgeonname);
$myData->setScatterSerieColor(1,数组(“R”=>0,“G”=>191,“B”=>255));
/*取消设置第一组的基线*/
$myData->SetSeriedRavable(数组(“基线”、“Ualert”、“Lalert”、“Ualarm”、“Lalarm”),FALSE);
/*创建pChart对象*/
$myPicture=new pImage(847304$myData);
$myPicture->drawGradientArea(0,0847304,方向垂直,阵列(“StartR”=>47,“StartG”=>47,“StartB”=>47,“EndR”=>17,“EndG”=>17,“EndB”=>17,“Alpha”=>100));
$myPicture->drawGradientArea(0250847304,方向垂直,阵列(“StartR”=>47,“StartG”=>47,“StartB”=>47,“EndR”=>27,“EndG”=>27,“EndB”=>27,“Alpha”=>100));
$myPicture->drawine(0249847249,数组(“R”=>0,“G”=>0,“B”=>0));
$myPicture->drawLine(0250847250,数组(“R”=>70,“G”=>70,“B”=>70));
/*写下图片标题*/
$myPicture->setFontProperties(数组(“FontName”=>drupal_get_路径(“模块”、“cg_图形”)。“/pChart/fonts/pf_arma_five.ttf”,“FontSize”=>6”);
$myPicture->setFontProperties(数组(“R”=>255,“G”=>255,“B”=>255));
$myPicture->drawText(423,14,$gsettings['title',数组(“R”=>255,“G”=>255,“B”=>255,“Align”=>TEXT\u Align\u middle));
/*设置图形区域*/
$myPicture->setGraphArea(58,27816228);
/*画一个长方形*/
$myPicture->drawFilledRectangle(57,27816228,数组(“R”=>0,“G”=>0,”B”=>0,“破折号”=>TRUE,“破折号”=>0,“破折号”=>51,“破折号”=>51,“边框R”=>0,“边框G”=>0,“边框B”=>0));
/*启用阴影计算*/
$myPicture->setShadow(真,数组(“X”=>1,“Y”=>1,“R”=>0,“G”=>0,“B”=>0,“Alpha”=>20));
/*创建散点图对象*/
$myScatter=新的pScatter($myPicture,$myData);
/*画天平*/
$myScatter->drawScatterScale(数组('LabelRotation'=>90,“Mode”=>SCALE\u Mode\u MANUAL,“XMargin”=>4,“Pos”=>SCALE\u Pos\u LEFTRIGHT,“ManualScale”=>$gsettings['maxmin','Factors'=>array(20));
$myScatter->drawScatterLegend(640266,数组(“模式”=>图例垂直,“样式”=>图例编号,“族”=>图例族线));
/*画一个散点图*/
$myScatter->drawScatterPlotChart();
/*绘制基线图*/
$myData->setSerieDrawable(数组(“pSurgeon”、“surgeronics”、“preSurgeons”、“reSurgeons”),FALSE);
$myData->setSerieDrawable(数组(“基线”、“Ualert”、“Lalert”),TRUE);
/*绘图线*/
$myPicture->drawLineChart(数组(“DisplayValues”=>FALSE,“DisplayColor”=>DISPLAY\u AUTO));
/*写0行*/
$myPicture->drawThreshold(0,数组(“WriteOptions”=>TRUE));
/*为图片添加边框*/
$myPicture->drawRectangle(0,0846303,数组(“R”=>204,“G”=>204,“B”=>204));
$myData->setSerieDrawable(数组(“reSurgeons”),FALSE;
/*设置系列设置*/
$myData->setSerieDescription(“基线”、“平均基线”);
$myData->setSerieDescription(“Ualert”、“上警戒线”);
$myData->setSerieDescription(“Lalert”,“下警戒线”);
$myData->setSerieDescription(“Ualarm”、“上报警线”);
$myData->setSerieDescription(“Lalarm”,“下警戒线”);
$myPicture->drawLegend(540266,数组(“模式”=>图例垂直,“样式”=>图例编号,“族”=>图例族线”);
/*渲染图片(选择最佳方式)*/
$imagename=str_replace(“”,“-”,$surgeonname);
$myPicture->render(drupal_get_path('module','cg_graphs')。“/pChart/examples/pictures/”$imagename.-“$gsettings['name']..png”);
}

好吧,所以我想出来了,我错过了线条图的绘图比例

新代码:

function cg_graphs_spline_plot($surgeonname, $plotpoint, $nnotnullsingletotal, $surgeonplots, $baseline, $gsettings){

      /*Build the binomial curve plots*/
      $binomloop = $gsettings['maxmin'][0]['Max'] + 1;
      $x = 0;
      for($i = 1; $i <= $binomloop; $i++){
        $upperalert = cg_graphs_get_binomial($baseline, $i, 0.995);
        $loweralert = cg_graphs_get_binomial($baseline, $i, 0.005);
        $lineXaxis[] = $x; //build values for the line x axis
        $baselineplots[] = $baseline; //build values for the baseline
        $Ualert[] = ($upperalert['upper'] * 100);
        $Lalert[] = ($upperalert['lower'] * 100);
        $upperalarm = cg_graphs_get_binomial($baseline, $i, 0.9995);
        $loweralarm = cg_graphs_get_binomial($baseline, $i, 0.0005);
        $Ualarm[] = ($upperalarm['upper'] * 100);
        $Lalarm[] = ($upperalarm['lower'] * 100);
        $x++;
      }
        unset($Ualert[0]); //delete the leading 0 value
        unset($Lalert[0]); //delete the leading 0 value
        mmi_watchdog('plotting alarm upper', '', $Ualert);
        mmi_watchdog('plotting alarm lower', '', $Lalert);
        //mmi_watchdog('plotting alarm upper', '', $Ualarm);
        //mmi_watchdog('plotting alarm lower', '', $Lalarm);

      /* Create the pData object */
      $myData = new pData();
      $myData->addPoints(array($plotpoint), "preSurgeons"); //Y pos just has to match pos of X
      $myData->addPoints(array($nnotnullsingletotal), "pSurgeon"); //array pos matches, so the

      foreach($surgeonplots['ops'] as $op){
        $myData->addPoints($op, "Surgeons");
      }

      foreach($surgeonplots['reop'] as $reop){
        $myData->addPoints($reop, "reSurgeons");
      }
      $myData->addPoints($baselineplots, "baseline"); //add baseline for line graph
      /** plot binomials */
      $myData->addPoints($Ualert, "Ualert"); //add upper alert
      $myData->addPoints($Lalert, "Lalert"); //add lower alert
      $myData->addPoints($Ualarm, "Ualarm"); //add upper alarm
      $myData->addPoints($Lalarm, "Lalarm"); //add lower alarm

      /* Create the X axis and the binded series */
      $myData->setSerieOnAxis("Surgeons",0);
      $myData->setSerieOnAxis("pSurgeon",0);
      $myData->setSerieOnAxis("Ualert",1);
      $myData->setSerieOnAxis("Lalert",1);
      $myData->setSerieOnAxis("baseline",1);
      $myData->setAxisName(0,$gsettings['axisXlabel']); //Number of operations -- removed for now
      $myData->setAxisXY(0,AXIS_X);
      $myData->setAxisPosition(0,AXIS_POSITION_BOTTOM);

      /* Create the Y axis and the binded series */
      $myData->setSerieOnAxis("reSurgeons",1);
      $myData->setSerieOnAxis("preSurgeons",1);
      $myData->setAxisName(1,$gsettings['axisYlabel']);
      $myData->setAxisXY(1,AXIS_Y);
      $myData->setAxisUnit(1,"%");
      $myData->setAxisPosition(1,AXIS_POSITION_LEFT);

      /* Create All surgeons scatter chart binding */
      $myData->setScatterSerie("Surgeons","reSurgeons",0);
      $myData->setScatterSerieDescription(0,"All Surgeons");
      $myData->setScatterSerieColor(0,array("R"=>255,"G"=>69,"B"=>0));

      /* Create Single Surgions scatter point */
      $myData->setScatterSerie("pSurgeon","preSurgeons",1);
      $myData->setScatterSerieDescription(1, $surgeonname);
      $myData->setScatterSerieColor(1,array("R"=>0,"G"=>191,"B"=>255));

      /*unset the baseline for the first set*/
      $myData->setSerieDrawable (array("baseline", "Ualert", "Lalert", "Ualarm", "Lalarm"), FALSE); 
      /* Create the pChart object */
      $myPicture = new pImage(847,304,$myData);

      $myPicture->drawGradientArea(0,0,847,304,DIRECTION_VERTICAL,array("StartR"=>47,"StartG"=>47,"StartB"=>47, "EndR"=>17,"EndG"=>17,"EndB"=>17,"Alpha"=>100));
      $myPicture->drawGradientArea(0,250,847,304,DIRECTION_VERTICAL,array("StartR"=>47,"StartG"=>47,"StartB"=>47, "EndR"=>27,"EndG"=>27,"EndB"=>27,"Alpha"=>100));
      $myPicture->drawLine(0,249,847,249,array("R"=>0,"G"=>0,"B"=>0));
      $myPicture->drawLine(0,250,847,250,array("R"=>70,"G"=>70,"B"=>70));

      /* Write the picture title */ 
      $myPicture->setFontProperties(array("FontName"=>drupal_get_path('module', 'cg_graphs')."/pChart/fonts/pf_arma_five.ttf","FontSize"=>6));
      $myPicture->setFontProperties(array("R"=>255,"G"=>255,"B"=>255));
      $myPicture->drawText(423,14,$gsettings['title'],array("R"=>255,"G"=>255,"B"=>255,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE));

      /* Set the graph area */
      $myPicture->setGraphArea(58,27,816,228);

      /* Draw a rectangle */
      $myPicture->drawFilledRectangle(57,27,816,228,array("R"=>0,"G"=>0,"B"=>0,"Dash"=>TRUE,"DashR"=>0, "DashG"=>51,"DashB"=>51,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0));

      /* Turn on shadow computing */ 
      $myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>20));

      /* Create the Scatter chart object */
      $myScatter = new pScatter($myPicture,$myData);

      /* Draw the scale */
      $myScatter->drawScatterScale(array("Mode" => SCALE_MODE_MANUAL, "XMargin"=>4, "Pos" => SCALE_POS_LEFTRIGHT, "ManualScale" => $gsettings['maxmin'], 'Factors' => array(20)));
      $myScatter->drawScatterLegend(640,266,array("Mode"=>LEGEND_VERTICAL ,"Style"=>LEGEND_NOBORDER, "Family"=>LEGEND_FAMILY_LINE));
      /* Draw a scatter plot chart */
      $myScatter->drawScatterPlotChart();
      /*Draw Baseline chart*/
      $myData->setSerieDrawable (array("pSurgeon", "Surgeons", "preSurgeons", "reSurgeons"), FALSE);
      $myData->setSerieDrawable (array("baseline", "Ualert", "Lalert", "Ualarm", "Lalarm"), TRUE);

      /* plot lines */
      $myData->addPoints($lineXaxis,"Labels");
      $myData->setSerieDescription("Labels","My labels");
      $myData->setAbscissa("Labels");

      $myPicture->drawScale(array("Mode" => SCALE_MODE_MANUAL, "XMargin"=>4, "Pos" => SCALE_POS_LEFTRIGHT, "ManualScale" => $gsettings['maxmin'], 'Factors' => array(20), 'RemoveXAxis' => TRUE));
      $myPicture->drawLineChart(array("DisplayValues"=>FALSE,"DisplayColor"=>DISPLAY_AUTO));

      /* Add a border to the picture */
      $myPicture->drawRectangle(0,0,846,303,array("R"=>204,"G"=>204,"B"=>204));

      /* Set serie settings */
      $myData->setSerieDescription("baseline","Average Baseline");
      $myData->setSerieDescription("Ualert","Upper Alert Line");
      $myData->setSerieDescription("Lalert","Lower Alert Line");
      $myData->setSerieDescription("Ualarm","Upper Alarm Line");
      $myData->setSerieDescription("Lalarm","Lower Alert Line");

      $myPicture->drawLegend(540,266,array("Mode"=>LEGEND_VERTICAL ,"Style"=>LEGEND_NOBORDER, "Family"=>LEGEND_FAMILY_LINE));

      /* Render the picture (choose the best way) */
      $imagename = str_replace(' ', '-', $surgeonname);
      $myPicture->render(drupal_get_path('module', 'cg_graphs')."/pChart/examples/pictures/".$imagename."-".$gsettings['name'].".png");
    }
function cg_graphs_spline_plot($surgeonname、$plotpoint、$SingleTotal、$surgeonplots、$baseline、$gsettings){
function cg_graphs_spline_plot($surgeonname, $plotpoint, $nnotnullsingletotal, $surgeonplots, $baseline, $gsettings){

      /*Build the binomial curve plots*/
      $binomloop = $gsettings['maxmin'][0]['Max'] + 1;
      $x = 0;
      for($i = 1; $i <= $binomloop; $i++){
        $upperalert = cg_graphs_get_binomial($baseline, $i, 0.995);
        $loweralert = cg_graphs_get_binomial($baseline, $i, 0.005);
        $lineXaxis[] = $x; //build values for the line x axis
        $baselineplots[] = $baseline; //build values for the baseline
        $Ualert[] = ($upperalert['upper'] * 100);
        $Lalert[] = ($upperalert['lower'] * 100);
        $upperalarm = cg_graphs_get_binomial($baseline, $i, 0.9995);
        $loweralarm = cg_graphs_get_binomial($baseline, $i, 0.0005);
        $Ualarm[] = ($upperalarm['upper'] * 100);
        $Lalarm[] = ($upperalarm['lower'] * 100);
        $x++;
      }
        unset($Ualert[0]); //delete the leading 0 value
        unset($Lalert[0]); //delete the leading 0 value
        mmi_watchdog('plotting alarm upper', '', $Ualert);
        mmi_watchdog('plotting alarm lower', '', $Lalert);
        //mmi_watchdog('plotting alarm upper', '', $Ualarm);
        //mmi_watchdog('plotting alarm lower', '', $Lalarm);

      /* Create the pData object */
      $myData = new pData();
      $myData->addPoints(array($plotpoint), "preSurgeons"); //Y pos just has to match pos of X
      $myData->addPoints(array($nnotnullsingletotal), "pSurgeon"); //array pos matches, so the

      foreach($surgeonplots['ops'] as $op){
        $myData->addPoints($op, "Surgeons");
      }

      foreach($surgeonplots['reop'] as $reop){
        $myData->addPoints($reop, "reSurgeons");
      }
      $myData->addPoints($baselineplots, "baseline"); //add baseline for line graph
      /** plot binomials */
      $myData->addPoints($Ualert, "Ualert"); //add upper alert
      $myData->addPoints($Lalert, "Lalert"); //add lower alert
      $myData->addPoints($Ualarm, "Ualarm"); //add upper alarm
      $myData->addPoints($Lalarm, "Lalarm"); //add lower alarm

      /* Create the X axis and the binded series */
      $myData->setSerieOnAxis("Surgeons",0);
      $myData->setSerieOnAxis("pSurgeon",0);
      $myData->setSerieOnAxis("Ualert",1);
      $myData->setSerieOnAxis("Lalert",1);
      $myData->setSerieOnAxis("baseline",1);
      $myData->setAxisName(0,$gsettings['axisXlabel']); //Number of operations -- removed for now
      $myData->setAxisXY(0,AXIS_X);
      $myData->setAxisPosition(0,AXIS_POSITION_BOTTOM);

      /* Create the Y axis and the binded series */
      $myData->setSerieOnAxis("reSurgeons",1);
      $myData->setSerieOnAxis("preSurgeons",1);
      $myData->setAxisName(1,$gsettings['axisYlabel']);
      $myData->setAxisXY(1,AXIS_Y);
      $myData->setAxisUnit(1,"%");
      $myData->setAxisPosition(1,AXIS_POSITION_LEFT);

      /* Create All surgeons scatter chart binding */
      $myData->setScatterSerie("Surgeons","reSurgeons",0);
      $myData->setScatterSerieDescription(0,"All Surgeons");
      $myData->setScatterSerieColor(0,array("R"=>255,"G"=>69,"B"=>0));

      /* Create Single Surgions scatter point */
      $myData->setScatterSerie("pSurgeon","preSurgeons",1);
      $myData->setScatterSerieDescription(1, $surgeonname);
      $myData->setScatterSerieColor(1,array("R"=>0,"G"=>191,"B"=>255));

      /*unset the baseline for the first set*/
      $myData->setSerieDrawable (array("baseline", "Ualert", "Lalert", "Ualarm", "Lalarm"), FALSE); 
      /* Create the pChart object */
      $myPicture = new pImage(847,304,$myData);

      $myPicture->drawGradientArea(0,0,847,304,DIRECTION_VERTICAL,array("StartR"=>47,"StartG"=>47,"StartB"=>47, "EndR"=>17,"EndG"=>17,"EndB"=>17,"Alpha"=>100));
      $myPicture->drawGradientArea(0,250,847,304,DIRECTION_VERTICAL,array("StartR"=>47,"StartG"=>47,"StartB"=>47, "EndR"=>27,"EndG"=>27,"EndB"=>27,"Alpha"=>100));
      $myPicture->drawLine(0,249,847,249,array("R"=>0,"G"=>0,"B"=>0));
      $myPicture->drawLine(0,250,847,250,array("R"=>70,"G"=>70,"B"=>70));

      /* Write the picture title */ 
      $myPicture->setFontProperties(array("FontName"=>drupal_get_path('module', 'cg_graphs')."/pChart/fonts/pf_arma_five.ttf","FontSize"=>6));
      $myPicture->setFontProperties(array("R"=>255,"G"=>255,"B"=>255));
      $myPicture->drawText(423,14,$gsettings['title'],array("R"=>255,"G"=>255,"B"=>255,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE));

      /* Set the graph area */
      $myPicture->setGraphArea(58,27,816,228);

      /* Draw a rectangle */
      $myPicture->drawFilledRectangle(57,27,816,228,array("R"=>0,"G"=>0,"B"=>0,"Dash"=>TRUE,"DashR"=>0, "DashG"=>51,"DashB"=>51,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0));

      /* Turn on shadow computing */ 
      $myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>20));

      /* Create the Scatter chart object */
      $myScatter = new pScatter($myPicture,$myData);

      /* Draw the scale */
      $myScatter->drawScatterScale(array("Mode" => SCALE_MODE_MANUAL, "XMargin"=>4, "Pos" => SCALE_POS_LEFTRIGHT, "ManualScale" => $gsettings['maxmin'], 'Factors' => array(20)));
      $myScatter->drawScatterLegend(640,266,array("Mode"=>LEGEND_VERTICAL ,"Style"=>LEGEND_NOBORDER, "Family"=>LEGEND_FAMILY_LINE));
      /* Draw a scatter plot chart */
      $myScatter->drawScatterPlotChart();
      /*Draw Baseline chart*/
      $myData->setSerieDrawable (array("pSurgeon", "Surgeons", "preSurgeons", "reSurgeons"), FALSE);
      $myData->setSerieDrawable (array("baseline", "Ualert", "Lalert", "Ualarm", "Lalarm"), TRUE);

      /* plot lines */
      $myData->addPoints($lineXaxis,"Labels");
      $myData->setSerieDescription("Labels","My labels");
      $myData->setAbscissa("Labels");

      $myPicture->drawScale(array("Mode" => SCALE_MODE_MANUAL, "XMargin"=>4, "Pos" => SCALE_POS_LEFTRIGHT, "ManualScale" => $gsettings['maxmin'], 'Factors' => array(20), 'RemoveXAxis' => TRUE));
      $myPicture->drawLineChart(array("DisplayValues"=>FALSE,"DisplayColor"=>DISPLAY_AUTO));

      /* Add a border to the picture */
      $myPicture->drawRectangle(0,0,846,303,array("R"=>204,"G"=>204,"B"=>204));

      /* Set serie settings */
      $myData->setSerieDescription("baseline","Average Baseline");
      $myData->setSerieDescription("Ualert","Upper Alert Line");
      $myData->setSerieDescription("Lalert","Lower Alert Line");
      $myData->setSerieDescription("Ualarm","Upper Alarm Line");
      $myData->setSerieDescription("Lalarm","Lower Alert Line");

      $myPicture->drawLegend(540,266,array("Mode"=>LEGEND_VERTICAL ,"Style"=>LEGEND_NOBORDER, "Family"=>LEGEND_FAMILY_LINE));

      /* Render the picture (choose the best way) */
      $imagename = str_replace(' ', '-', $surgeonname);
      $myPicture->render(drupal_get_path('module', 'cg_graphs')."/pChart/examples/pictures/".$imagename."-".$gsettings['name'].".png");
    }