Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class "PHPlot" not found. phplot, php8.3, Ubuntu 24.04 #17

Open
suovantie opened this issue Dec 19, 2024 · 0 comments
Open

Class "PHPlot" not found. phplot, php8.3, Ubuntu 24.04 #17

suovantie opened this issue Dec 19, 2024 · 0 comments

Comments

@suovantie
Copy link

suovantie commented Dec 19, 2024

REASON FOUND: ( Now I got to go through all my 34 old programs )
In the example below there is :
$plot = new PHPlot(800, 600);.
Everything OK, if you write:
$plot = new Phplot\Phplot\phplot(800, 600);

Original message:
Running the program on command line
Error message "Class "PHPlot" not found" on line
$plot = new PHPlot(800, 600);.

Example code copied from:
https://phplot.sourceforge.net/phplotdocs/examples.htmlhttps://phplot.sourceforge.net/phplotdocs/examples.html

`<?php

PHPlot Example: Simple line graph

require_once 'phplot.php';

$data = array(
array('', 1800, 5), array('', 1810, 7), array('', 1820, 10),
array('', 1830, 13), array('', 1840, 17), array('', 1850, 23),
array('', 1980, 227), array('', 1990, 249), array('', 2000, 281),
);

$plot = new PHPlot(800, 600);
$plot->SetImageBorderType('plain');

$plot->SetPlotType('lines');
$plot->SetDataType('data-data');
$plot->SetDataValues($data);

Main plot title:

$plot->SetTitle('US Population, in millions');

Make sure Y axis starts at 0:

$plot->SetPlotAreaWorld(NULL, 0, NULL, NULL);

$plot->DrawGraph();
?>
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant