jpgraph 繪圖有關問題

來源:互聯網
上載者:User
jpgraph 繪圖問題
本帖最後由 PurpleGalaxy 於 2014-07-17 11:29:34 編輯

require_once ('/usr/share/jpgraph/jpgraph.php');
require_once ('/usr/share/jpgraph/jpgraph_line.php');
require_once ('/usr/share/jpgraph/jpgraph_scatter.php');
require_once ('/usr/share/jpgraph/jpgraph_bar.php');

$datay1 = array(33,20,24,5,38,24,22);
$datay2 = array(9,7,10,25,10,8,4);

// Setup the graph
$graph = new Graph(600,450);

$graph->SetScale("textlin",0,50);
//$theme_class= new UniversalTheme;
//$graph->SetTheme($theme_class);


$graph->title->Set("Line Plots with Markers");

$graph->SetBox(false);

//$graph->ygrid->SetFill(false);
// $graph->yaxis->HideLine(false);
// $graph->yaxis->HideTicks(false,false);
//$graph->yaxis->HideZeroLabel();
[color=#FF0000]
[/color]

$graph->xaxis->SetTickLabels(array('A','B','C','D','E','F','G'));
// Create the plot
$p1 = new LinePlot($datay1);
$graph->Add($p1);

$p2 = new LinePlot($datay2);
$graph->Add($p2);

// Use an image of favourite car as marker
$p1->mark->SetType(MARK_IMG,'new1.gif',0.8);
$p1->SetColor('#aadddd');
$p1->value->SetFormat('%d');
$p1->value->Show();
$p1->value->SetColor('#55bbdd');

$p2->mark->SetType(MARK_IMG,'new2.gif',0.8);
$p2->SetColor('#ddaa99');
$p2->value->SetFormat('%d');
$p2->value->Show();
$p2->value->SetColor('#55bbdd');
$graph->Stroke();
?>

為什麼加上紅色的行就不能顯示代碼了?感覺是函數找不到,但具體怎麼弄阿?
------解決方案--------------------
注釋掉 $graph->Stroke(); 就應該能看到錯誤資訊
------解決方案--------------------
那就沒有錯唄
------解決方案--------------------
這個類UniversalTheme代碼 可能有語法錯誤。
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.