about summary refs log tree commit diff
path: root/sourcecodes/network_layout_inv_2_example.php
diff options
context:
space:
mode:
authorziejd22018-03-14 23:19:16 -0500
committerziejd22018-03-14 23:19:16 -0500
commitc80226899f5cdd9f11c163817d59445213f5bef0 (patch)
treee0fd79d2e32fd2aedda2eadaed0f19af3514c520 /sourcecodes/network_layout_inv_2_example.php
parent324ebc8ddacab8e154047b8518afd5cbb5bb2fa4 (diff)
downloadBNW-c80226899f5cdd9f11c163817d59445213f5bef0.tar.gz
Separating Octave and php calculations
Diffstat (limited to 'sourcecodes/network_layout_inv_2_example.php')
-rw-r--r--sourcecodes/network_layout_inv_2_example.php37
1 files changed, 19 insertions, 18 deletions
diff --git a/sourcecodes/network_layout_inv_2_example.php b/sourcecodes/network_layout_inv_2_example.php
index 3ec0d84c..7835ec0d 100644
--- a/sourcecodes/network_layout_inv_2_example.php
+++ b/sourcecodes/network_layout_inv_2_example.php
@@ -573,7 +573,7 @@ $flag=0; //evidence flag
      if($ev_arr[$ii]==$name)
      {
         $evd=$evdata_arr[$ii]; 
-        $evd=levelmap($evd,$name,$levelmap);
+        //$evd=levelmap($evd,$name,$levelmap);
         $flag=1;
         break;
      }
@@ -766,8 +766,8 @@ else
          chart.draw(data,
                  {title:"<?php print($named);?>", titleTextStyle: {fontSize: <?php print($font);?>},
                   width:<?php print($width);?>, height:<?php print($hieght);?>,
-                  vAxis: {title: "State", textStyle: {fontSize:<?php print($font);?>}},
-		    hAxis: {title: "Fraction", minValue: 0, maxValue: 1, gridlines: {count: 3}}, legend: {position: 'none'},
+                  vAxis: {textStyle: {fontSize:<?php print($font);?>}},
+		    hAxis: {minValue: 0, maxValue: 1, gridlines: {count: 3}}, legend: {position: 'none'},
                   backgroundColor: {stroke: '<?php print($bcolor);?>', strokeWidth: 5}}
             );
         google.visualization.events.addListener(chart, 'select', selectHandler);  
@@ -800,20 +800,20 @@ if($evd==-9999)
     {
 ?>
   var data = google.visualization.arrayToDataTable([
-   ['<?php print($name);?>', 'Old'],
+	[{label:'<?php print($name);?>',type:'number'},{label:'Old'}],
 <?php
   $c_i=2;
   $c_i_old=2;
   for($j=0;$j<100;$j++) 
   {
        $val1=trim($data_read[$s_i][$c_i]);
-       $val1=map($name,$val1,$keyval);
+       //$val1=map($name,$val1,$keyval);
        $c_i++;
        $val2=trim($data_read[$s_i][$c_i]);
        $c_i++;         
 
        $val1_old=trim($data_read_old[$s_i_old][$c_i_old]);
-       $val1_old=map($name,$val1_old,$keyval);
+       //$val1_old=map($name,$val1_old,$keyval);
 
        $c_i_old++;
        $val2_old=trim($data_read_old[$s_i_old][$c_i_old]);
@@ -826,14 +826,14 @@ if($evd==-9999)
   if($j==100)
   {
         $val1=trim($data_read[$s_i][$c_i]);
-       $val1=map($name,$val1,$keyval);
+	//$val1=map($name,$val1,$keyval);
 
        $c_i++;
        $val2=trim($data_read[$s_i][$c_i]);
        $c_i++;
 
        $val1_old=trim($data_read_old[$s_i_old][$c_i_old]);
-       $val1_old=map($name,$val1_old,$keyval);
+	//$val1_old=map($name,$val1_old,$keyval);
   
        $c_i_old++;
        $val2_old=trim($data_read_old[$s_i_old][$c_i_old]);
@@ -850,14 +850,14 @@ if($evd==-9999)
 
 ?>
   var data = google.visualization.arrayToDataTable([
-   ['<?php print($name);?>', 'Old', 'New'],
+	[{label:'<?php print($name);?>',type:'number'},{label:'Old'},{label:'New'}],
 <?php
   $c_i=2;
   $c_i_old=2;
   for($j=0;$j<100;$j++) 
   {
        $val1=trim($data_read[$s_i][$c_i]);
-       $val1=map($name,$val1,$keyval);
+       //$val1=map($name,$val1,$keyval);
        $c_i++;
        $val2=trim($data_read[$s_i][$c_i]);
        $c_i++;         
@@ -874,7 +874,7 @@ if($evd==-9999)
   if($j==100)
   {
         $val1=trim($data_read[$s_i][$c_i]);
-       $val1=map($name,$val1,$keyval);
+	//$val1=map($name,$val1,$keyval);
 
        $c_i++;
        $val2=trim($data_read[$s_i][$c_i]);
@@ -892,11 +892,11 @@ if($evd==-9999)
 }
 else
 {
-    $evd=map($name,$evd,$keyval);
+  //$evd=map($name,$evd,$keyval);
     $evduse=$evd;
 ?>
   var data = google.visualization.arrayToDataTable([
-    ['<?php print($name);?>', 'Old', 'New'],
+	[{label:'<?php print($name);?>',type:'number'},{label: 'Old'},{label: 'New'}],
 
 <?php
  
@@ -904,7 +904,7 @@ else
   for($j=0;$j<100;$j++) 
   {     
        $val1_old=trim($data_read_old[$s_i_old][$c_i_old]);
-       $val1_old=map($name,$val1_old,$keyval);
+       //$val1_old=map($name,$val1_old,$keyval);
 
        $c_i_old++;
        $val2_old=trim($data_read_old[$s_i_old][$c_i_old]);
@@ -927,7 +927,7 @@ else
   if($j==100)
   {
        $val1_old=trim($data_read_old[$s_i_old][$c_i_old]);
-       $val1_old=map($name,$val1_old,$keyval);
+       //$val1_old=map($name,$val1_old,$keyval);
        $c_i_old++;
        $val2_old=trim($data_read_old[$s_i_old][$c_i_old]);
        $c_i_old++;
@@ -973,9 +973,10 @@ else
                   title:"<?php print($named);?>", titleTextStyle: {fontSize: <?php print($font);?>},
 			legend: {position: 'none'},
                   width:<?php print($width);?>, height:<?php print($hieght);?>,
-                  hAxis: {maxValue: 1, minValue: 0},
-			vAxis: {maxValue: 1, minValue: 0},
-                  backgroundColor: {stroke: '<?php print($bcolor);?>', strokeWidth: 5}}
+		  hAxis: {gridlines: {count: 4}, textStyle: {fontSize: 9}, viewWindowMode: 'maximized'},
+                   vAxis: {maxValue: 1, minValue: 0,viewWindow: {min:0}, gridlines: {count:5}, textStyle: {fontSize: 9}},
+                   chartArea:{left:30,top:25,right:8,bottom:25},
+                   backgroundColor: {stroke: '<?php print($bcolor);?>', strokeWidth: 5}}
             );
            google.visualization.events.addListener(chart, 'select', selectHandler); 
        }