Example #1
0
				"JN039368" : "Themisto libellula isolate TN2 18S ribosomal RNA gene, partial sequence",
				"DQ378048" : "Themisto compressa 18S ribosomal RNA gene, complete sequence",
				"DQ378047" : "Hyperia macrocephala 18S ribosomal RNA gene, partial sequence",
				"GU358617" : "Hyperietta sibaginis isolate HYSI141 18S ribosomal RNA gene, partial sequence",
				"GU969172" : "Hyperioides sibaginis 18S ribosomal RNA gene, partial sequence",
				"DQ378050" : "Primno macropa 18S ribosomal RNA gene, complete sequence",
				"DQ378052" : "Eupronoe minuta 18S ribosomal RNA gene, complete sequence",
				"GU358616" : "Hyperietta vosseleri isolate HYVO027 18S ribosomal RNA gene, partial sequence",
				"GU358622" : "Phrosina semilunata isolate PHSENH 18S ribosomal RNA gene, partial sequence",
				"DQ378053" : "Phronima sp. UE-2006 18S ribosomal RNA gene, complete sequence",
				"AY781424" : "Phronima sp. TS-2005 small subunit ribosomal RNA gene, complete sequence",
				"GU358614" : "Eupronoe intermedia isolate EUIN134 18S ribosomal RNA gene, partial sequence",
				"DQ378043" : "Cyllopus magellanicus 18S ribosomal RNA gene, complete sequence",
				"GU358627" : "Tetrathyrus forcipatus isolate TEFONH 18S ribosomal RNA gene, partial sequence",
				"GU358621" : "Phronimella elongata isolate PHEL023 18S ribosomal RNA gene, partial sequence",
				"DQ378042" : "Cyllopus lucasi 18S ribosomal RNA gene, partial sequence",
				"GU358611" : "Amphithyrus bispinosus isolate AMBI147 18S ribosomal RNA gene, partial sequence",
				"GU358615" : "Hemityphis tenuimanus isolate HETE147 18S ribosomal RNA gene, partial sequence",
				"GU358629" : "Vibilia armata isolate VIAR024 18S ribosomal RNA gene, partial sequence",
				"GU358613" : "Eupronoe intermedia isolate EUIN023 18S ribosomal RNA gene, partial sequence",
				"DQ378044" : "Vibilia antarctica 18S ribosomal RNA gene, complete sequence",
				"DQ378045" : "Vibilia sp. UE-2006 18S ribosomal RNA gene, complete sequence",
				"GU358612" : "Amphithyrus muratus isolate AMMU134 18S ribosomal RNA gene, partial sequence"
			}
		}
	}';
    $obj = json_decode($json);
    $svg = tree2svg($obj, 600, 400, 300, 10, false, 'definition');
    header('Content-type: image/svg+xml');
    echo $svg;
}
Example #2
0
<head>
	<meta charset="utf-8" />
	<title>Untitled</title>';
    echo '<script>
function node_info(otu)
    {
    	var info = document.getElementById("info");
    	info.innerHTML = otu;
    }
</script>';
    echo '
</head>
<body>';
    echo '<div id="info" style="float:right;width:300px;height:100px;border:1px solid red;"></div>';
    echo '<div style="border:1px solid red;width:650px; height:100%; overflow:auto;">';
    $svg = tree2svg($obj, 600, 400, 300, 10, false, 'translate');
    //header('Content-type: image/svg+xml');
    echo $svg;
    echo '</div>';
    echo '
</body>
</html>';
} else {
    echo '<html>
<head>
</head>
<body>
<form method="get" action="tv.php">
	<input id="url" name="url" size="60"></input>
	<input type="submit" value="Go"></input>
</form>