-  $g->SetMargin(50,30,40,$height);
-  $g->title->Set($sensor_name.'/'.$param_name.', '.$param_unit);
-  $g->title->SetFont(FF_DV_SANSSERIF,FS_BOLD,12);
-  $g->SetMarginColor('silver');
+  $g->SetMargin(50,30,$topheight,$bottomheight);
+  if ($scale) {
+    $g->title->Set($sensor_name.'/'.$param_name.', '.$param_unit);
+    $g->title->SetFont(FF_DV_SANSSERIF,FS_BOLD,12);
+  }  
+  $g->SetMarginColor('lightgray');
+
+  $g->xgrid->Show();
+  $g->xgrid->SetLineStyle('dotted');
+  $g->ygrid->Show();
+  $g->ygrid->SetLineStyle('dotted');