Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions PHP_VERSIONS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
8.5
8.4
8.3
8.2
8.1
8.2
8.3
8.4
8.5
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ composer require macocci7/php-scatterplot

$sp = new Scatterplot();
$sp->layers($layers)
->create('img/BasicUsage.png');
->create(__DIR__ . '/img/BasicUsage.png');
```

- Result: [examples/img/BasicUsage.png](examples/img/BasicUsage.png)
Expand Down Expand Up @@ -138,7 +138,7 @@ composer require macocci7/php-scatterplot
->labelX('Data X')
->labelY('Data Y')
->caption('Using Layers')
->create('img/UsingLayers.png');
->create(__DIR__ . '/img/UsingLayers.png');
```

- Result: [examples/img/UsingLayers.png](examples/img/UsingLayers.png)
Expand Down Expand Up @@ -206,7 +206,7 @@ composer require macocci7/php-scatterplot
->labelY('DATA Y')
->caption('SCATTER PLOT')
->legends($legends)
->create('img/AdjustDisplayByMethods.png');
->create(__DIR__ . '/img/AdjustDisplayByMethods.png');
```

- Result: [examples/img/AdjustDisplayByMethods.png](examples/img/AdjustDisplayByMethods.png)
Expand Down Expand Up @@ -357,8 +357,8 @@ Second, Code PHP like this:

$sp = new Scatterplot();
$sp->layers($layers)
->config('AdjustDisplayByNeon.neon')
->create('img/AdjustDisplayByNeon.png');
->config(__DIR__ . '/AdjustDisplayByNeon.neon')
->create(__DIR__ . '/img/AdjustDisplayByNeon.png');
```

Then, run the PHP code.
Expand Down Expand Up @@ -416,7 +416,7 @@ Then, run the PHP code.
'yLimitUpper' => 12,
'yLimitLower' => 0,
'plotDiameter' => 6,
//'fontPath' => 'fonts/ipaexg.ttf', // IPA ex Gothic 00401
//'fontPath' => __DIR__ . '/fonts/ipaexg.ttf', // IPA ex Gothic 00401
//'fontSize' => 16,
//'fontColor' => '#333333',
'referenceLineX' => true,
Expand Down Expand Up @@ -467,7 +467,7 @@ Then, run the PHP code.
$sp = new Scatterplot();
$sp->layers($layers)
->config($conf)
->create('img/AdjustDisplayByArray.png');
->create(__DIR__ . '/img/AdjustDisplayByArray.png');
```

- Result: [examples/img/AdjustDisplayByArray.png](examples/img/AdjustDisplayByArray.png)
Expand Down Expand Up @@ -506,12 +506,12 @@ Then, run the PHP code.

$sp = new Scatterplot();
$sp->layers($layers)
->config('AdjustDisplayByNeon.neon')
->config(__DIR__ . '/AdjustDisplayByNeon.neon')
->config([
// This results in transparent backgournd
'canvasBackgroundColor' => null,
])
->create('img/TransparentBackground.png');
->create(__DIR__ . '/img/TransparentBackground.png');
```

- Result: [examples/img/TransparentBackground.png](examples/img/TransparentBackground.png)
Expand Down Expand Up @@ -662,4 +662,4 @@ Then, run the PHP code.

***

Copyright 2023 - 2025 macocci7.
Copyright 2023 - 2026 macocci7.
2 changes: 1 addition & 1 deletion conf/Plotter.neon
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ props:
#yLimitLower:
plotDiameter: 2
plotColor: '#000000'
fontPath: 'fonts/ipaexg.ttf' # IPA ex Gothic 00401
#fontPath: 'fonts/ipaexg.ttf' # IPA ex Gothic 00401
#fontPath: 'fonts/ipaexm.ttf' # IPA ex Mincho 00401
fontSize: 16
fontColor: '#333333'
Expand Down
2 changes: 0 additions & 2 deletions conf/Scatterplot.neon
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ validConfig:
type: int
plotColor:
type: colorCode|null
fontPath:
type: string
fontSize:
type: number
fontColor:
Expand Down
4 changes: 2 additions & 2 deletions examples/AdjustDisplayByArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'yLimitUpper' => 12,
'yLimitLower' => 0,
'plotDiameter' => 6,
//'fontPath' => 'fonts/ipaexg.ttf', // IPA ex Gothic 00401
//'fontPath' => __DIR__ . '/fonts/ipaexg.ttf', // IPA ex Gothic 00401
//'fontSize' => 16,
//'fontColor' => '#333333',
'referenceLineX' => true,
Expand Down Expand Up @@ -93,4 +93,4 @@
$sp = new Scatterplot();
$sp->layers($layers)
->config($conf)
->create('img/AdjustDisplayByArray.png');
->create(__DIR__ . '/img/AdjustDisplayByArray.png');
1 change: 0 additions & 1 deletion examples/AdjustDisplayByMethods.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
|yLimitLower|0|
|plotDiameter|4|
|plotColor|#33cccc|
|fontPath|fonts/ipaexg.ttf|
|fontSize|16|
|fontColor|#333333|
|regressionLine|`true`|
Expand Down
2 changes: 1 addition & 1 deletion examples/AdjustDisplayByMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
->labelY('DATA Y')
->caption('SCATTER PLOT')
->legends($legends)
->create('img/AdjustDisplayByMethods.png');
->create(__DIR__ . '/img/AdjustDisplayByMethods.png');

// Markdown -------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions examples/AdjustDisplayByNeon.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@

$sp = new Scatterplot();
$sp->layers($layers)
->config('AdjustDisplayByNeon.neon')
->create('img/AdjustDisplayByNeon.png');
->config(__DIR__ . '/AdjustDisplayByNeon.neon')
->create(__DIR__ . '/img/AdjustDisplayByNeon.png');
2 changes: 1 addition & 1 deletion examples/BasicUsage.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

$sp = new Scatterplot();
$sp->layers($layers)
->create('img/BasicUsage.png');
->create(__DIR__ . '/img/BasicUsage.png');

// Markdown -------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions examples/Matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Macocci7\PhpCsv\Csv;
use Macocci7\PhpScatterplot\Scatterplot;

$cu = new Csv('csv/weather_tokyo.csv');
$cu = new Csv(__DIR__ . '/csv/weather_tokyo.csv');
$cb = new Combination();

$cu->encode('SJIS', 'UTF-8')
Expand Down Expand Up @@ -41,7 +41,7 @@
->labelX($dictionary[$heads[$x]])
->labelY($dictionary[$heads[$y]])
->caption('Weather in Tokyo : ' . $days[0] . '~' . $days[count($days) - 1])
->create(sprintf("img/Matrix%02d.png", $index));
->create(sprintf(__DIR__ . "/img/Matrix%02d.png", $index));
$parsed[] = $sp->parse($layers);
}

Expand Down
6 changes: 3 additions & 3 deletions examples/TransparentBackground.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

$sp = new Scatterplot();
$sp->layers($layers)
->config('AdjustDisplayByNeon.neon')
->config(__DIR__ . '/AdjustDisplayByNeon.neon')
->config([
// This results in transparent backgournd
// This results in transparent background
'canvasBackgroundColor' => null,
])
->create('img/TransparentBackground.png');
->create(__DIR__ . '/img/TransparentBackground.png');
2 changes: 1 addition & 1 deletion examples/UsingLayers.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
->labelX('Data X')
->labelY('Data Y')
->caption('Using Layers')
->create('img/UsingLayers.png');
->create(__DIR__ . '/img/UsingLayers.png');

// Markdown -------------------------------------

Expand Down
Loading