Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $rezultat = mysqli_query($polaczenie, "SELECT * FROM pomiary") or die ("Błąd zapytania do bazy: $dbname");
- $d=0;
- $X1 = $wiersz[1];
- $X2 = $wiersz[2];
- $X3 = $wiersz[3];
- $X4 = $wiersz[4];
- $X5 = $wiersz[5];
- while ($wiersz = mysqli_fetch_array ($rezultat)) {
- $data[$d][0] = '';
- $data[$d][1] = $l;
- $data[$d][2] = $X1;
- $data[$d][3] = $X2;
- $data[$d][4] = $X3;
- $data[$d][5] = $X4;
- $data[$d][6] = $X5;
- $d = $d+1;
- }
- $data[0][0] = 'Ostatni';
- $data[$d-1][0] = "Aktualny";
- mysqli_query($polaczenie, "SELECT x1,x2,x3,x4,x5 FROM pomiary");
- require_once 'phplot.php';
- $plot = new PHPlot(600, 500);
- $plot -> SetImageBorderType('plain');
- $plot -> SetPlotType('lines');
- $plot -> SetDataType('data-data');
- $plot -> SetDataValues($data);
- # Tytuł głównego wykresu:
- $plot -> SetTitle('Temperatura: ');
- $plot->SetLegend(array('X1', 'X2', 'X3', 'X4', 'X5'));
- $plot -> SetPlotAreaWorld(NULL, 0, NULL, NULL);
- $plot -> DrawGraph();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement