diff --git a/.github/workflows/test_pull_request.yml b/.github/workflows/test_pull_request.yml index cafbcc9..b5cfebc 100644 --- a/.github/workflows/test_pull_request.yml +++ b/.github/workflows/test_pull_request.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ['8.1', '8.2', '8.3', '8.4', '8.5'] + php: ['8.3', '8.4', '8.5'] steps: - name: Set up PHP @@ -24,7 +24,7 @@ jobs: node-version: '24.x' - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -66,7 +66,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ['8.4'] + php: ['8.5'] steps: - name: Set up PHP @@ -82,7 +82,7 @@ jobs: node-version: '24.x' - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -90,7 +90,7 @@ jobs: run: composer install --no-interaction - name: Update PHPUnit for Code Coverage - run: composer require phpunit/phpunit:^10.5 sebastian/version:* --with-all-dependencies + run: composer require phpunit/phpunit:^12.5 sebastian/version:* --with-all-dependencies - name: PHP Lint run: ./vendor/bin/parallel-lint src tests examples diff --git a/LICENSE b/LICENSE index 36a3822..32aa312 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 macocci7 +Copyright (c) 2023-present macocci7 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/PHP_VERSIONS b/PHP_VERSIONS index 0f39030..1bb66be 100644 --- a/PHP_VERSIONS +++ b/PHP_VERSIONS @@ -1,5 +1,3 @@ -8.1 -8.2 8.3 8.4 8.5 diff --git a/README.md b/README.md index 7648bdc..6b563f2 100644 --- a/README.md +++ b/README.md @@ -35,14 +35,20 @@ You can also retrieve parsed data: ## 3. Requirements -- PHP 8.1 or later +- PHP 8.3 or later - Imagick PHP Extension Check with commands: ```php - php -i | grep imagick + (php -m; php -i) | grep imagick ``` -- Composer +- Mbstring PHP Extension + + Check with commands: + ```php + (php -m; php -i) | grep mbstring + ``` +- [Composer](https://getcomposer.org/) ## 4. Installation @@ -279,7 +285,7 @@ First, prepare a Neon file like this: yLimitUpper: 12 yLimitLower: 0 plotDiameter: 6 - #fontPath: 'fonts/ipaexg.ttf' # IPA ex Gothic 00401 + #fontPath: '/usr/share/fonts/opentype/ipafont-gothic/ipagp.ttf' #fontSize: 16 #fontColor: '#333333' referenceLineX: true @@ -416,7 +422,7 @@ Then, run the PHP code. 'yLimitUpper' => 12, 'yLimitLower' => 0, 'plotDiameter' => 6, - //'fontPath' => __DIR__ . '/fonts/ipaexg.ttf', // IPA ex Gothic 00401 + //'fontPath' => '/usr/share/fonts/opentype/ipafont-gothic/ipagp.ttf', //'fontSize' => 16, //'fontColor' => '#333333', 'referenceLineX' => true, @@ -653,13 +659,9 @@ Then, run the PHP code. -- [ParsedData.php](example/ParsedData.php) >> results in [ParsedData.txt](example/ParsedData.txt) -- [Matrix.php](example/Matrix.php) >> results in [Matrix.md](example/Matrix.md) +- [ParsedData.php](examples/ParsedData.php) >> results in [ParsedData.txt](examples/ParsedData.txt) +- [Matrix.php](examples/Matrix.php) >> results in [Matrix.md](examples/Matrix.md) ## 7. License [MIT](LICENSE) - -*** - -Copyright 2023 - 2026 macocci7. diff --git a/composer.json b/composer.json index 37a52f5..d0eb2d7 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ ], "minimum-stability": "stable", "require": { - "php": ">=8.1", - "intervention/image": "^3.11", + "php": ">=8.3", + "intervention/image": "^4.0", "macocci7/php-frequency-table": "^1.4", "macocci7/php-csv": "^1.1", "macocci7/php-combination": "^1.1", @@ -25,7 +25,7 @@ }, "require-dev": { "squizlabs/php_codesniffer": "^4.0", - "phpunit/phpunit": "^10.5", + "phpunit/phpunit": "^12.5", "phpstan/phpstan": "^2.1", "php-parallel-lint/php-parallel-lint": "^1.4" } diff --git a/examples/AdjustDisplayByArray.php b/examples/AdjustDisplayByArray.php index e16d268..521684f 100644 --- a/examples/AdjustDisplayByArray.php +++ b/examples/AdjustDisplayByArray.php @@ -42,7 +42,7 @@ 'yLimitUpper' => 12, 'yLimitLower' => 0, 'plotDiameter' => 6, - //'fontPath' => __DIR__ . '/fonts/ipaexg.ttf', // IPA ex Gothic 00401 + //'fontPath' => '/usr/share/fonts/opentype/ipafont-gothic/ipagp.ttf:', //'fontSize' => 16, //'fontColor' => '#333333', 'referenceLineX' => true, diff --git a/examples/AdjustDisplayByNeon.neon b/examples/AdjustDisplayByNeon.neon index ad0b015..41856ba 100644 --- a/examples/AdjustDisplayByNeon.neon +++ b/examples/AdjustDisplayByNeon.neon @@ -16,7 +16,7 @@ xLimitLower: 0 yLimitUpper: 12 yLimitLower: 0 plotDiameter: 6 -#fontPath: 'fonts/ipaexg.ttf' # IPA ex Gothic 00401 +#fontPath: '/usr/share/fonts/opentype/ipafont-gothic/ipagp.ttf' #fontSize: 16 #fontColor: '#333333' referenceLineX: true diff --git a/examples/Matrix.md b/examples/Matrix.md index 9f3a2cf..cb44f3f 100644 --- a/examples/Matrix.md +++ b/examples/Matrix.md @@ -4,7 +4,7 @@ Japan Meteorological Agency -## Period: 2023/5/9~2023/6/9 +## Period: 2026/3/1~2026/4/1 @@ -22,110 +22,110 @@ - count: 32 - x: - - Mean: 19.809375 - - Max: 25.4 - - Min: 13.9 - - Variance: 6.748974609375 - - StandardDeviation: 2.5978788673406 + - Mean: 11.059375 + - Max: 16.9 + - Min: 4.8 + - Variance: 8.230537109375 + - StandardDeviation: 2.8688912683082 - y: - - Mean: 24.7375 - - Max: 32.2 - - Min: 17.2 - - Variance: 13.52796875 - - StandardDeviation: 3.678038709693 -- Covariance: 8.4012109375 -- CorrelationCoefficient: 0.87923849923656 + - Mean: 15.70625 + - Max: 21.8 + - Min: 8.2 + - Variance: 10.3274609375 + - StandardDeviation: 3.213636715234 +- Covariance: 8.19619140625 +- CorrelationCoefficient: 0.88899889832395 - RegressionLineFormula: - - a: 1.2448129417808 - - b: 0.078533631411009 + - a: 0.99582703987983 + - b: 4.693025330829 @@ -136,88 +136,88 @@ - count: 32 - x: - - Mean: 24.7375 - - Max: 32.2 - - Min: 17.2 - - Variance: 13.52796875 - - StandardDeviation: 3.678038709693 + - Mean: 15.70625 + - Max: 21.8 + - Min: 8.2 + - Variance: 10.3274609375 + - StandardDeviation: 3.213636715234 - y: - - Mean: 15.596875 - - Max: 19.7 - - Min: 10.1 - - Variance: 6.726552734375 - - StandardDeviation: 2.5935598574884 -- Covariance: 3.6088671875 -- CorrelationCoefficient: 0.37831915261387 + - Mean: 7.365625 + - Max: 14.9 + - Min: 1.5 + - Variance: 9.417880859375 + - StandardDeviation: 3.0688566045638 +- Covariance: 6.69771484375 +- CorrelationCoefficient: 0.67913056515729 - RegressionLineFormula: - - a: 0.26677081047367 - - b: 8.9976320759076 + - a: 0.64853451243083 + - b: -2.8204201858667 @@ -229,66 +229,66 @@ - count: 32 - x: - - Mean: 15.596875 - - Max: 19.7 - - Min: 10.1 - - Variance: 6.726552734375 - - StandardDeviation: 2.5935598574884 + - Mean: 7.365625 + - Max: 14.9 + - Min: 1.5 + - Variance: 9.417880859375 + - StandardDeviation: 3.0688566045638 - y: - - Mean: 5.653125 - - Max: 13.3 + - Mean: 5.3 + - Max: 11.3 - Min: 0 - - Variance: 21.256240234375 - - StandardDeviation: 4.6104490274132 -- Covariance: -4.230458984375 -- CorrelationCoefficient: -0.35379198363538 + - Variance: 17.759375 + - StandardDeviation: 4.2141873475203 +- Covariance: -4.6971875 +- CorrelationCoefficient: -0.36320135623976 - RegressionLineFormula: - - a: -0.62891932189216 - - b: 15.462301048637 + - a: -0.49875206218225 + - b: 8.9736206580111 @@ -301,44 +301,44 @@ - count: 32 - x: - - Mean: 5.653125 - - Max: 13.3 + - Mean: 5.3 + - Max: 11.3 - Min: 0 - - Variance: 21.256240234375 - - StandardDeviation: 4.6104490274132 + - Variance: 17.759375 + - StandardDeviation: 4.2141873475203 - y: - - Mean: 11.828125 - - Max: 168.5 + - Mean: 4.5625 + - Max: 31 - Min: 0 - - Variance: 1067.1970214844 - - StandardDeviation: 32.667981594895 -- Covariance: -50.076806640625 -- CorrelationCoefficient: -0.33248426687446 + - Variance: 74.76171875 + - StandardDeviation: 8.6464859191466 +- Covariance: -17.03125 +- CorrelationCoefficient: -0.46740466921376 - RegressionLineFormula: - - a: -2.3558637881615 - - b: 25.14611747745 + - a: -0.9590005278902 + - b: 9.6452027978181 @@ -352,22 +352,22 @@ - count: 32 - x: - - Mean: 11.828125 - - Max: 168.5 + - Mean: 4.5625 + - Max: 31 - Min: 0 - - Variance: 1067.1970214844 - - StandardDeviation: 32.667981594895 + - Variance: 74.76171875 + - StandardDeviation: 8.6464859191466 - y: - - Mean: 1009.31875 - - Max: 1021.3 - - Min: 997 - - Variance: 36.3283984375 - - StandardDeviation: 6.0273044088962 -- Covariance: -94.59990234375 -- CorrelationCoefficient: -0.48044674984083 + - Mean: 1014.55625 + - Max: 1020.8 + - Min: 1004.6 + - Variance: 17.8293359375 + - StandardDeviation: 4.2224798326931 +- Covariance: -16.728515625 +- CorrelationCoefficient: -0.45819482918123 - RegressionLineFormula: - - a: -0.088643334304072 - - b: 1010.3672344386 + - a: -0.22375777208841 + - b: 1015.5771448352 diff --git a/examples/Matrix.php b/examples/Matrix.php index 210d2ee..42ee460 100644 --- a/examples/Matrix.php +++ b/examples/Matrix.php @@ -6,7 +6,7 @@ use Macocci7\PhpCsv\Csv; use Macocci7\PhpScatterplot\Scatterplot; -$cu = new Csv(__DIR__ . '/csv/weather_tokyo.csv'); +$cu = new Csv(__DIR__ . '/csv/weather_tokyo_2026mar.csv'); $cb = new Combination(); $cu->encode('SJIS', 'UTF-8') diff --git a/examples/ParsedData.txt b/examples/ParsedData.txt index df79397..ece62b9 100644 --- a/examples/ParsedData.txt +++ b/examples/ParsedData.txt @@ -1,86 +1,86 @@ array(2) { - ["John"]=> + 'John' => array(6) { - ["count"]=> + 'count' => int(11) - ["x"]=> + 'x' => array(5) { - ["Mean"]=> - int(6) - ["Max"]=> + 'Mean' => + double(6) + 'Max' => int(11) - ["Min"]=> + 'Min' => int(1) - ["Variance"]=> - int(10) - ["StandardDeviation"]=> - float(3.1622776601683795) + 'Variance' => + double(10) + 'StandardDeviation' => + double(3.1622776601683795) } - ["y"]=> + 'y' => array(5) { - ["Mean"]=> - int(5) - ["Max"]=> + 'Mean' => + double(5) + 'Max' => int(11) - ["Min"]=> + 'Min' => int(1) - ["Variance"]=> - float(10.181818181818182) - ["StandardDeviation"]=> - float(3.1908961408698624) + 'Variance' => + double(10.181818181818182) + 'StandardDeviation' => + double(3.1908961408698624) } - ["Covariance"]=> - float(5.181818181818182) - ["CorrelationCoefficient"]=> - float(0.5135343537364686) - ["RegressionLineFormula"]=> + 'Covariance' => + double(5.181818181818182) + 'CorrelationCoefficient' => + double(0.5135343537364686) + 'RegressionLineFormula' => array(2) { - ["a"]=> - float(0.5181818181818182) - ["b"]=> - float(1.8909090909090907) + 'a' => + double(0.5181818181818182) + 'b' => + double(1.8909090909090907) } } - ["Jake"]=> + 'Jake' => array(6) { - ["count"]=> + 'count' => int(11) - ["x"]=> + 'x' => array(5) { - ["Mean"]=> - int(6) - ["Max"]=> + 'Mean' => + double(6) + 'Max' => int(11) - ["Min"]=> + 'Min' => int(1) - ["Variance"]=> - int(10) - ["StandardDeviation"]=> - float(3.1622776601683795) + 'Variance' => + double(10) + 'StandardDeviation' => + double(3.1622776601683795) } - ["y"]=> + 'y' => array(5) { - ["Mean"]=> - int(6) - ["Max"]=> + 'Mean' => + double(6) + 'Max' => int(11) - ["Min"]=> + 'Min' => int(1) - ["Variance"]=> - int(10) - ["StandardDeviation"]=> - float(3.1622776601683795) + 'Variance' => + double(10) + 'StandardDeviation' => + double(3.1622776601683795) } - ["Covariance"]=> - float(-9.454545454545455) - ["CorrelationCoefficient"]=> - float(-0.9454545454545453) - ["RegressionLineFormula"]=> + 'Covariance' => + double(-9.454545454545455) + 'CorrelationCoefficient' => + double(-0.9454545454545453) + 'RegressionLineFormula' => array(2) { - ["a"]=> - float(-0.9454545454545455) - ["b"]=> - float(11.672727272727274) + 'a' => + double(-0.9454545454545455) + 'b' => + double(11.672727272727274) } } } diff --git a/examples/csv/weather_tokyo.csv b/examples/csv/weather_tokyo.csv deleted file mode 100644 index 3f652ce..0000000 --- a/examples/csv/weather_tokyo.csv +++ /dev/null @@ -1,39 +0,0 @@ -_E[hF2023/06/10 11:07:29 - -,,,,,,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,,,,,,, -N,ϋC(),ϋC(),ϋC(),ōC(),ōC(),ōC(),ŒC(),ŒC(),ŒC(),Ǝ(),Ǝ(),Ǝ(),Ǝ(),~ʂ̍v(mm),~ʂ̍v(mm),~ʂ̍v(mm),~ʂ̍v(mm),ϏC(hPa),ϏC(hPa),ϏC(hPa),όnC(hPa),όnC(hPa),όnC(hPa),ω_(10),ω_(10),ω_(10) -,,,,,,,,,,,,,,,,,,,,,,,,,, -,,i,ώԍ,,i,ώԍ,,i,ώԍ,,ۂȂ,i,ώԍ,,ۂȂ,i,ώԍ,,i,ώԍ,,i,ώԍ,,i,ώԍ -2023/5/9,15.1,8,1,20.6,8,1,10.1,8,1,11.7,0,8,1,0,1,8,1,8.8,8,1,1013.4,8,1,6.8,8,1 -2023/5/10,17.7,8,1,25.0,8,1,11.4,8,1,11.2,0,8,1,0,1,8,1,12.0,8,1,1011.5,8,1,5.0,8,1 -2023/5/11,15.8,8,1,23.4,8,1,10.7,8,1,5.9,0,8,1,9.0,0,8,1,13.2,8,1,1015.7,8,1,6.8,8,1 -2023/5/12,17.1,8,1,21.9,8,1,11.3,8,1,7.9,0,8,1,0.0,0,8,1,12.9,8,1,1018.1,8,1,6.3,8,1 -2023/5/13,16.7,8,1,18.1,8,1,15.4,8,1,0.3,0,8,1,5.0,0,8,1,15.7,8,1,1017.4,8,1,10.0,8,1 -2023/5/14,16.9,8,1,21.2,8,1,14.3,8,1,0.4,0,8,1,3.0,0,8,1,15.7,8,1,1013.5,8,1,10.0,8,1 -2023/5/15,16.1,8,1,18.1,8,1,14.6,8,1,0.0,0,8,1,15.5,0,8,1,17.3,8,1,1008.6,8,1,9.8,8,1 -2023/5/16,19.9,8,1,27.5,8,1,13.1,8,1,13.1,0,8,1,0,1,8,1,14.5,8,1,1008.5,8,1,2.8,8,1 -2023/5/17,22.8,8,1,31.6,8,1,15.1,8,1,12.6,0,8,1,0,1,8,1,17.5,8,1,1010.3,8,1,0.0,8,1 -2023/5/18,25.4,8,1,32.2,8,1,18.7,8,1,11.9,0,8,1,0,1,8,1,16.7,8,1,1011.1,8,1,7.5,8,1 -2023/5/19,20.6,8,1,24.5,8,1,17.1,8,1,0.0,0,8,1,12.0,0,8,1,18.8,8,1,1008.1,8,1,10.0,8,1 -2023/5/20,18.8,8,1,22.8,8,1,16.4,8,1,0.7,0,8,1,4.0,0,8,1,19.6,8,1,1006.0,8,1,9.0,8,1 -2023/5/21,21.1,8,1,26.3,8,1,16.1,8,1,6.7,0,8,1,0,1,8,1,19.7,8,1,1005.1,8,1,7.5,8,1 -2023/5/22,22.5,8,1,29.4,8,1,16.5,8,1,4.6,0,8,1,0.0,0,8,1,20.9,8,1,1001.4,8,1,8.0,8,1 -2023/5/23,13.9,8,1,17.2,8,1,12.3,8,1,0.0,0,8,1,14.0,0,8,1,14.7,8,1,1001.4,8,1,10.0,8,1 -2023/5/24,18.2,8,1,23.9,8,1,11.8,8,1,13.3,0,8,1,0,1,8,1,11.4,8,1,1007.9,8,1,0.5,8,1 -2023/5/25,18.6,8,1,23.8,8,1,13.6,8,1,6.8,0,8,1,0,1,8,1,13.8,8,1,1020.0,8,1,7.5,8,1 -2023/5/26,20.1,8,1,24.9,8,1,16.0,8,1,5.1,0,8,1,0,1,8,1,15.7,8,1,1021.3,8,1,7.5,8,1 -2023/5/27,21.2,8,1,26.7,8,1,16.5,8,1,12.5,0,8,1,0,1,8,1,16.3,8,1,1020.2,8,1,10.0,8,1 -2023/5/28,21.6,8,1,25.8,8,1,17.8,8,1,6.1,0,8,1,0.0,0,8,1,18.3,8,1,1015.2,8,1,9.5,8,1 -2023/5/29,19.8,8,1,21.3,8,1,18.8,8,1,0.0,0,8,1,18.5,0,8,1,22.5,8,1,1007.4,8,1,10.0,8,1 -2023/5/30,21.4,8,1,26.3,8,1,18.6,8,1,3.1,0,8,1,0.0,0,8,1,22.2,8,1,1005.2,8,1,9.3,8,1 -2023/5/31,19.3,8,1,22.2,8,1,16.0,8,1,1.3,0,8,1,3.0,0,8,1,15.7,8,1,1009.0,8,1,9.8,8,1 -2023/6/1,20.8,8,1,26.2,8,1,15.3,8,1,8.1,0,8,1,0.0,0,8,1,17.4,8,1,1010.6,8,1,8.0,8,1 -2023/6/2,21.3,8,1,23.8,8,1,19.7,8,1,0.0,0,8,1,168.5,0,8,1,25.1,8,1,999.7,8,1,10.0,8,1 -2023/6/3,20.0,8,1,24.0,8,1,17.5,8,1,4.5,0,8,1,92.5,0,8,1,19.2,8,1,997.0,8,1,5.5,8,1 -2023/6/4,21.6,8,1,27.5,8,1,15.3,8,1,8.1,0,8,1,0,1,8,1,17.2,8,1,1004.8,8,1,6.8,8,1 -2023/6/5,23.1,8,1,29.8,8,1,18.4,8,1,8.6,0,8,1,0,1,8,1,17.1,8,1,1006.0,8,1,9.5,8,1 -2023/6/6,20.7,8,1,25.1,8,1,17.0,8,1,0.8,0,8,1,3.0,0,8,1,18.7,8,1,1006.2,8,1,9.3,8,1 -2023/6/7,22.5,8,1,29.6,8,1,17.0,8,1,9.0,0,8,1,5.5,0,8,1,19.3,8,1,1005.6,8,1,9.0,8,1 -2023/6/8,23.1,8,1,28.7,8,1,18.5,8,1,6.6,0,8,1,1.0,0,8,1,20.1,8,1,1009.4,8,1,9.0,8,1 -2023/6/9,20.2,8,1,22.2,8,1,18.2,8,1,0.0,0,8,1,24.0,0,8,1,23.4,8,1,1002.6,8,1,,0,1 diff --git a/examples/csv/weather_tokyo_2026mar.csv b/examples/csv/weather_tokyo_2026mar.csv new file mode 100644 index 0000000..526c10c --- /dev/null +++ b/examples/csv/weather_tokyo_2026mar.csv @@ -0,0 +1,39 @@ +_E[hF2026/04/10 21:30:50 + +,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,, +N,ϋC(),ϋC(),ϋC(),ōC(),ōC(),ōC(),ŒC(),ŒC(),ŒC(),Ǝ(),Ǝ(),Ǝ(),Ǝ(),~ʂ̍v(mm),~ʂ̍v(mm),~ʂ̍v(mm),~ʂ̍v(mm),ϏC(hPa),ϏC(hPa),ϏC(hPa),όnC(hPa),όnC(hPa),όnC(hPa),ω_(10),ω_(10),ω_(10) +,,,,,,,,,,,,,,,,,,,,,,,,,, +,,i,ώԍ,,i,ώԍ,,i,ώԍ,,ۂȂ,i,ώԍ,,ۂȂ,i,ώԍ,,i,ώԍ,,i,ώԍ,,i,ώԍ +2026/3/1,12.7,8,1,19.0,8,1,8.3,8,1,10.4,0,8,1,0,1,8,1,6.1,8,1,1016.6,8,1,3.5,8,1 +2026/3/2,11.4,8,1,13.4,8,1,9.2,8,1,0.0,0,8,1,0.0,0,8,1,8.4,8,1,1019.2,8,1,10.0,8,1 +2026/3/3,7.4,8,1,11.4,8,1,4.6,8,1,0.0,0,8,1,31.0,0,8,1,8.8,8,1,1016.0,8,1,10.0,8,1 +2026/3/4,8.9,8,1,15.8,8,1,4.9,8,1,6.8,0,8,1,25.5,0,8,1,7.2,8,1,1007.7,8,1,5.0,8,1 +2026/3/5,10.1,8,1,17.1,8,1,6.1,8,1,10.5,0,8,1,0,1,8,1,4.2,8,1,1014.7,8,1,0.0,8,1 +2026/3/6,9.4,8,1,14.3,8,1,4.4,8,1,1.0,0,8,1,0,1,8,1,7.0,8,1,1017.1,8,1,8.5,8,1 +2026/3/7,11.6,8,1,17.4,8,1,7.7,8,1,8.6,0,8,1,1.0,0,8,1,6.6,8,1,1008.6,8,1,7.0,8,1 +2026/3/8,7.5,8,1,12.1,8,1,4.1,8,1,10.9,0,8,1,0,1,8,1,3.3,8,1,1016.2,8,1,4.5,8,1 +2026/3/9,8.1,8,1,13.6,8,1,4.2,8,1,6.8,0,8,1,0,1,8,1,5.2,8,1,1017.4,8,1,9.8,8,1 +2026/3/10,4.8,8,1,8.2,8,1,2.0,8,1,3.3,0,8,1,3.0,0,8,1,6.3,8,1,1017.2,8,1,5.3,8,1 +2026/3/11,6.6,8,1,11.9,8,1,1.5,8,1,10.7,0,8,1,0.0,0,8,1,4.7,8,1,1020.8,8,1,2.3,8,1 +2026/3/12,8.2,8,1,13.4,8,1,4.8,8,1,10.6,0,8,1,0.0,0,8,1,4.2,8,1,1018.5,8,1,3.0,8,1 +2026/3/13,7.4,8,1,10.0,8,1,4.1,8,1,0.7,0,8,1,0,1,8,1,4.6,8,1,1017.8,8,1,9.0,8,1 +2026/3/14,9.9,8,1,16.0,8,1,6.0,8,1,9.5,0,8,1,0,1,8,1,6.0,8,1,1017.4,8,1,4.0,8,1 +2026/3/15,10.8,8,1,15.8,8,1,5.3,8,1,9.3,0,8,1,0,1,8,1,6.1,8,1,1016.4,8,1,3.0,8,1 +2026/3/16,10.1,8,1,14.1,8,1,6.9,8,1,3.4,0,8,1,0.0,0,8,1,7.7,8,1,1017.0,8,1,7.8,8,1 +2026/3/17,11.2,8,1,16.1,8,1,8.3,8,1,5.4,0,8,1,0,1,8,1,7.1,8,1,1018.0,8,1,7.8,8,1 +2026/3/18,13.2,8,1,16.8,8,1,9.1,8,1,1.7,0,8,1,0.5,0,8,1,10.4,8,1,1015.3,8,1,10.0,8,1 +2026/3/19,14.8,8,1,19.8,8,1,10.0,8,1,0.0,0,8,1,0.0,0,8,1,10.2,8,1,1004.6,8,1,10.0,8,1 +2026/3/20,9.1,8,1,11.2,8,1,6.5,8,1,0.0,0,8,1,6.0,0,8,1,9.2,8,1,1011.3,8,1,10.0,8,1 +2026/3/21,10.6,8,1,17.1,8,1,4.3,8,1,11.3,0,8,1,0,1,8,1,5.5,8,1,1018.1,8,1,2.5,8,1 +2026/3/22,11.3,8,1,17.1,8,1,5.6,8,1,7.2,0,8,1,0,1,8,1,6.5,8,1,1019.8,8,1,5.5,8,1 +2026/3/23,12.2,8,1,17.5,8,1,9.8,8,1,4.1,0,8,1,1.0,0,8,1,9.3,8,1,1012.5,8,1,5.5,8,1 +2026/3/24,12.8,8,1,18.1,8,1,9.2,8,1,10.5,0,8,1,0,1,8,1,6.0,8,1,1015.4,8,1,4.8,8,1 +2026/3/25,11.8,8,1,14.4,8,1,11.0,8,1,0.0,0,8,1,16.0,0,8,1,10.3,8,1,1015.5,8,1,10.0,8,1 +2026/3/26,11.7,8,1,13.4,8,1,10.7,8,1,0.0,0,8,1,20.5,0,8,1,12.8,8,1,1009.4,8,1,10.0,8,1 +2026/3/27,13.4,8,1,18.9,8,1,9.7,8,1,5.7,0,8,1,2.5,0,8,1,11.3,8,1,1010.2,8,1,7.8,8,1 +2026/3/28,13.9,8,1,19.6,8,1,9.6,8,1,5.9,0,8,1,3.0,0,8,1,12.2,8,1,1011.8,8,1,8.8,8,1 +2026/3/29,15.9,8,1,21.8,8,1,10.4,8,1,10.2,0,8,1,0,1,8,1,12.9,8,1,1014.5,8,1,2.5,8,1 +2026/3/30,16.2,8,1,20.7,8,1,12.0,8,1,5.1,0,8,1,0,1,8,1,12.7,8,1,1017.4,8,1,9.5,8,1 +2026/3/31,16.9,8,1,19.0,8,1,14.9,8,1,0.0,0,8,1,12.5,0,8,1,16.7,8,1,1006.1,8,1,10.0,8,1 +2026/4/1,14.0,8,1,17.6,8,1,10.5,8,1,0.0,0,8,1,23.5,0,8,1,14.6,8,1,1007.3,8,1,9.3,8,1 diff --git a/examples/fonts/IPA_Font_License_Agreement_v1.0.txt b/examples/fonts/IPA_Font_License_Agreement_v1.0.txt deleted file mode 100644 index 272d5f6..0000000 --- a/examples/fonts/IPA_Font_License_Agreement_v1.0.txt +++ /dev/null @@ -1,117 +0,0 @@ --------------------------------------------------- -IPA Font License Agreement v1.0 --------------------------------------------------- - -IPAフォントライセンスv1.0 - -許諾者は、この使用許諾(以下「本契約」といいます。)に定める条件の下で、許諾プログラム(1条に定義するところによります。)を提供します。受領者(1条に定義するところによります。)が、許諾プログラムを使用し、複製し、または頒布する行為、その他、本契約に定める権利の利用を行った場合、受領者は本契約に同意したものと見なします。 - - -第1条 用語の定義 - -本契約において、次の各号に掲げる用語は、当該各号に定めるところによります。 - -1.「デジタル・フォント・プログラム」とは、フォントを含み、レンダリングしまたは表示するために用いられるコンピュータ・プログラムをいいます。 -2.「許諾プログラム」とは、許諾者が本契約の下で許諾するデジタル・フォント・プログラムをいいます。 -3.「派生プログラム」とは、許諾プログラムの一部または全部を、改変し、加除修正等し、入れ替え、その他翻案したデジタル・フォント・プログラムをいい、許諾プログラムの一部もしくは全部から文字情報を取り出し、またはデジタル・ドキュメント・ファイルからエンベッドされたフォントを取り出し、取り出された文字情報をそのまま、または改変をなして新たなデジタル・フォント・プログラムとして製作されたものを含みます。 -4.「デジタル・コンテンツ」とは、デジタル・データ形式によってエンド・ユーザに提供される制作物のことをいい、動画・静止画等の映像コンテンツおよびテレビ番組等の放送コンテンツ、ならびに文字テキスト、画像、図形等を含んで構成された制作物を含みます。 -5.「デジタル・ドキュメント・ファイル」とは、PDFファイルその他、各種ソフトウェア・プログラムによって製作されたデジタル・コンテンツであって、その中にフォントを表示するために許諾プログラムの全部または一部が埋め込まれた(エンベッドされた)ものをいいます。フォントが「エンベッドされた」とは、当該フォントが埋め込まれた特定の「デジタル・ドキュメント・ファイル」においてのみ表示されるために使用されている状態を指し、その特定の「デジタル・ドキュメント・ファイル」以外でフォントを表示するために使用できるデジタル・フォント・プログラムに含まれている場合と区別されます。 -6.「コンピュータ」とは、本契約においては、サーバを含みます。 -7.「複製その他の利用」とは、複製、譲渡、頒布、貸与、公衆送信、上映、展示、翻案その他の利用をいいます。 -8.「受領者」とは、許諾プログラムを本契約の下で受領した人をいい、受領者から許諾プログラムを受領した人を含みます。 - -第2条 使用許諾の付与 - -許諾者は受領者に対し、本契約の条項に従い、すべての国で、許諾プログラムを使用することを許諾します。ただし、許諾プログラムに存在する一切の権利はすべて許諾者が保有しています。本契約は、本契約で明示的に定められている場合を除き、いかなる意味においても、許諾者が保有する許諾プログラムに関する一切の権利および、いかなる商標、商号、もしくはサービス・マークに関する権利をも受領者に移転するものではありません。 - -1.受領者は本契約に定める条件に従い、許諾プログラムを任意の数のコンピュータにインストールし、当該コンピュータで使用することができます。 -2.受領者はコンピュータにインストールされた許諾プログラムをそのまま、または改変を行ったうえで、印刷物およびデジタル・コンテンツにおいて、文字テキスト表現等として使用することができます。 -3.受領者は前項の定めに従い作成した印刷物およびデジタル・コンテンツにつき、その商用・非商用の別、および放送、通信、各種記録メディアなどの媒体の形式を問わず、複製その他の利用をすることができます。 -4.受領者がデジタル・ドキュメント・ファイルからエンベッドされたフォントを取り出して派生プログラムを作成した場合には、かかる派生プログラムは本契約に定める条件に従う必要があります。 -5.許諾プログラムのエンベッドされたフォントがデジタル・ドキュメント・ファイル内のデジタル・コンテンツをレンダリングするためにのみ使用される場合において、受領者が当該デジタル・ドキュメント・ファイルを複製その他の利用をする場合には、受領者はかかる行為に関しては本契約の下ではいかなる義務をも負いません。 -6.受領者は、3条2項の定めに従い、商用・非商用を問わず、許諾プログラムをそのままの状態で改変することなく複製して第三者への譲渡し、公衆送信し、その他の方法で再配布することができます(以下、「再配布」といいます。)。 -7.受領者は、上記の許諾プログラムについて定められた条件と同様の条件に従って、派生プログラムを作成し、使用し、複製し、再配布することができます。ただし、受領者が派生プログラムを再配布する場合には、3条1項の定めに従うものとします。 - -第3条 制限 - -前条により付与された使用許諾は、以下の制限に服します。 - -1.派生プログラムが前条4項及び7項に基づき再配布される場合には、以下の全ての条件を満たさなければなりません。 - (1)派生プログラムを再配布する際には、下記もまた、当該派生プログラムと一緒に再配布され、オンラインで提供され、または、郵送費・媒体及び取扱手数料の合計を超えない実費と引き換えに媒体を郵送する方法により提供されなければなりません。 -  (a)派生プログラムの写し; および -  (b)派生プログラムを作成する過程でフォント開発プログラムによって作成された追加のファイルであって派生プログラムをさらに加工するにあたって利用できるファイルが存在すれば、当該ファイル - (2)派生プログラムの受領者が、派生プログラムを、このライセンスの下で最初にリリースされた許諾プログラム(以下、「オリジナル・プログラム」といいます。)に置き換えることができる方法を再配布するものとします。かかる方法は、オリジナル・ファイルからの差分ファイルの提供、または、派生プログラムをオリジナル・プログラムに置き換える方法を示す指示の提供などが考えられます。 - (3)派生プログラムを、本契約書に定められた条件の下でライセンスしなければなりません。 - (4)派生プログラムのプログラム名、フォント名またはファイル名として、許諾プログラムが用いているのと同一の名称、またはこれを含む名称を使用してはなりません。 - (5)本項の要件を満たすためにオンラインで提供し、または媒体を郵送する方法で提供されるものは、その提供を希望するいかなる者によっても提供が可能です。 -2.受領者が前条6項に基づき許諾プログラムを再配布する場合には、以下の全ての条件を満たさなければなりません。 - (1)許諾プログラムの名称を変更してはなりません。 - (2)許諾プログラムに加工その他の改変を加えてはなりません。 - (3)本契約の写しを許諾プログラムに添付しなければなりません。 -3.許諾プログラムは、現状有姿で提供されており、許諾プログラムまたは派生プログラムについて、許諾者は一切の明示または黙示の保証(権利の所在、非侵害、商品性、特定目的への適合性を含むがこれに限られません)を行いません。いかなる場合にも、その原因を問わず、契約上の責任か厳格責任か過失その他の不法行為責任かにかかわらず、また事前に通知されたか否かにかかわらず、許諾者は、許諾プログラムまたは派生プログラムのインストール、使用、複製その他の利用または本契約上の権利の行使によって生じた一切の損害(直接・間接・付随的・特別・拡大・懲罰的または結果的損害)(商品またはサービスの代替品の調達、システム障害から生じた損害、現存するデータまたはプログラムの紛失または破損、逸失利益を含むがこれに限られません)について責任を負いません。 -4.許諾プログラムまたは派生プログラムのインストール、使用、複製その他の利用に関して、許諾者は技術的な質問や問い合わせ等に対する対応その他、いかなるユーザ・サポートをも行う義務を負いません。 - -第4条 契約の終了 - -1.本契約の有効期間は、受領者が許諾プログラムを受領した時に開始し、受領者が許諾プログラムを何らかの方法で保持する限り続くものとします。 -2.前項の定めにかかわらず、受領者が本契約に定める各条項に違反したときは、本契約は、何らの催告を要することなく、自動的に終了し、当該受領者はそれ以後、許諾プログラムおよび派生プログラムを一切使用しまたは複製その他の利用をすることができないものとします。ただし、かかる契約の終了は、当該違反した受領者から許諾プログラムまたは派生プログラムの配布を受けた受領者の権利に影響を及ぼすものではありません。 - -第5条 準拠法 - -1.IPAは、本契約の変更バージョンまたは新しいバージョンを公表することができます。その場合には、受領者は、許諾プログラムまたは派生プログラムの使用、複製その他の利用または再配布にあたり、本契約または変更後の契約のいずれかを選択することができます。その他、上記に記載されていない条項に関しては日本の著作権法および関連法規に従うものとします。 -2.本契約は、日本法に基づき解釈されます。 - - ----------- - -IPA Font License Agreement v1.0 - -The Licensor provides the Licensed Program (as defined in Article 1 below) under the terms of this license agreement (“Agreement”). Any use, reproduction or distribution of the Licensed Program, or any exercise of rights under this Agreement by a Recipient (as defined in Article 1 below) constitutes the Recipient's acceptance of this Agreement. - -Article 1 (Definitions) -1.“Digital Font Program” shall mean a computer program containing, or used to render or display fonts. -2.“Licensed Program” shall mean a Digital Font Program licensed by the Licensor under this Agreement. -3.“Derived Program” shall mean a Digital Font Program created as a result of a modification, addition, deletion, replacement or any other adaptation to or of a part or all of the Licensed Program, and includes a case where a Digital Font Program newly created by retrieving font information from a part or all of the Licensed Program or Embedded Fonts from a Digital Document File with or without modification of the retrieved font information. -4.“Digital Content” shall mean products provided to end users in the form of digital data, including video content, motion and/or still pictures, TV programs or other broadcasting content and products consisting of character text, pictures, photographic images, graphic symbols and/or the like. -5.“Digital Document File” shall mean a PDF file or other Digital Content created by various software programs in which a part or all of the Licensed Program becomes embedded or contained in the file for the display of the font (“Embedded Fonts”). Embedded Fonts are used only in the display of characters in the particular Digital Document File within which they are embedded, and shall be distinguished from those in any Digital Font Program, which may be used for display of characters outside that particular Digital Document File. -6.“Computer” shall include a server in this Agreement. -7.“Reproduction and Other Exploitation” shall mean reproduction, transfer, distribution, lease, public transmission, presentation, exhibition, adaptation and any other exploitation. -8.“Recipient” shall mean anyone who receives the Licensed Program under this Agreement, including one that receives the Licensed Program from a Recipient. - -Article 2 (Grant of License) -The Licensor grants to the Recipient a license to use the Licensed Program in any and all countries in accordance with each of the provisions set forth in this Agreement. However, any and all rights underlying in the Licensed Program shall be held by the Licensor. In no sense is this Agreement intended to transfer any right relating to the Licensed Program held by the Licensor except as specifically set forth herein or any right relating to any trademark, trade name, or service mark to the Recipient. - -1.The Recipient may install the Licensed Program on any number of Computers and use the same in accordance with the provisions set forth in this Agreement. -2.The Recipient may use the Licensed Program, with or without modification in printed materials or in Digital Content as an expression of character texts or the like. -3.The Recipient may conduct Reproduction and Other Exploitation of the printed materials and Digital Content created in accordance with the preceding Paragraph, for commercial or non-commercial purposes and in any form of media including but not limited to broadcasting, communication and various recording media. -4.If any Recipient extracts Embedded Fonts from a Digital Document File to create a Derived Program, such Derived Program shall be subject to the terms of this agreement. -5.If any Recipient performs Reproduction or Other Exploitation of a Digital Document File in which Embedded Fonts of the Licensed Program are used only for rendering the Digital Content within such Digital Document File then such Recipient shall have no further obligations under this Agreement in relation to such actions. -6.The Recipient may reproduce the Licensed Program as is without modification and transfer such copies, publicly transmit or otherwise redistribute the Licensed Program to a third party for commercial or non-commercial purposes (“Redistribute”), in accordance with the provisions set forth in Article 3 Paragraph 2. -7.The Recipient may create, use, reproduce and/or Redistribute a Derived Program under the terms stated above for the Licensed Program: provided, that the Recipient shall follow the provisions set forth in Article 3 Paragraph 1 when Redistributing the Derived Program. - -Article 3 (Restriction) -The license granted in the preceding Article shall be subject to the following restrictions: - -1.If a Derived Program is Redistributed pursuant to Paragraph 4 and 7 of the preceding Article, the following conditions must be met : - (1)The following must be also Redistributed together with the Derived Program, or be made available online or by means of mailing mechanisms in exchange for a cost which does not exceed the total costs of postage, storage medium and handling fees: -  (a)a copy of the Derived Program; and -  (b)any additional file created by the font developing program in the course of creating the Derived Program that can be used for further modification of the Derived Program, if any. - (2)It is required to also Redistribute means to enable recipients of the Derived Program to replace the Derived Program with the Licensed Program first released under this License (the “Original Program”). Such means may be to provide a difference file from the Original Program, or instructions setting out a method to replace the Derived Program with the Original Program. - (3)The Recipient must license the Derived Program under the terms and conditions of this Agreement. - (4)No one may use or include the name of the Licensed Program as a program name, font name or file name of the Derived Program. - (5)Any material to be made available online or by means of mailing a medium to satisfy the requirements of this paragraph may be provided, verbatim, by any party wishing to do so. -2.If the Recipient Redistributes the Licensed Program pursuant to Paragraph 6 of the preceding Article, the Recipient shall meet all of the following conditions: - (1)The Recipient may not change the name of the Licensed Program. - (2)The Recipient may not alter or otherwise modify the Licensed Program. - (3)The Recipient must attach a copy of this Agreement to the Licensed Program. -3.THIS LICENSED PROGRAM IS PROVIDED BY THE LICENSOR “AS IS” AND ANY EXPRESSED OR IMPLIED WARRANTY AS TO THE LICENSED PROGRAM OR ANY DERIVED PROGRAM, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. IN NO EVENT SHALL THE LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXTENDED, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO; PROCUREMENT OF SUBSTITUTED GOODS OR SERVICE; DAMAGES ARISING FROM SYSTEM FAILURE; LOSS OR CORRUPTION OF EXISTING DATA OR PROGRAM; LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE INSTALLATION, USE, THE REPRODUCTION OR OTHER EXPLOITATION OF THE LICENSED PROGRAM OR ANY DERIVED PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -4.The Licensor is under no obligation to respond to any technical questions or inquiries, or provide any other user support in connection with the installation, use or the Reproduction and Other Exploitation of the Licensed Program or Derived Programs thereof. - -Article 4 (Termination of Agreement) -1.The term of this Agreement shall begin from the time of receipt of the Licensed Program by the Recipient and shall continue as long as the Recipient retains any such Licensed Program in any way. -2.Notwithstanding the provision set forth in the preceding Paragraph, in the event of the breach of any of the provisions set forth in this Agreement by the Recipient, this Agreement shall automatically terminate without any notice. In the case of such termination, the Recipient may not use or conduct Reproduction and Other Exploitation of the Licensed Program or a Derived Program: provided that such termination shall not affect any rights of any other Recipient receiving the Licensed Program or the Derived Program from such Recipient who breached this Agreement. - -Article 5 (Governing Law) -1.IPA may publish revised and/or new versions of this License. In such an event, the Recipient may select either this Agreement or any subsequent version of the Agreement in using, conducting the Reproduction and Other Exploitation of, or Redistributing the Licensed Program or a Derived Program. Other matters not specified above shall be subject to the Copyright Law of Japan and other related laws and regulations of Japan. -2.This Agreement shall be construed under the laws of Japan. - diff --git a/examples/fonts/Readme_IPAexfont00401.txt b/examples/fonts/Readme_IPAexfont00401.txt deleted file mode 100644 index cefa23a..0000000 --- a/examples/fonts/Readme_IPAexfont00401.txt +++ /dev/null @@ -1,36 +0,0 @@ -IPAexフォント -― はじめにお読みください ― - -IPAexフォントは、JIS X 0213:2012に準拠したTrueTypeアウトラインベースのOpenTypeフォントです。 - -IPAexフォントの使用または利用に当たっては、添付の「IPAフォントライセンスv1.0」に定める条件に従ってください。 -IPAexフォントを使用し、複製し、または頒布する行為、その他、「IPAフォントライセンスv1.0」に定める権利の利用を行った場合、受領者は「IPAフォントライセンスv1.0」に同意したものと見なします。 - - -IPAexフォント2書体パック(IPAexゴシック、IPAex明朝) IPAexfont00401.zip -|--はじめにお読みください Readme_IPAexfont00401.txt -|--IPAフォントライセンスv1.0 IPA_Font_License_Agreement_v1.0.txt -|--IPAexゴシック(Ver.004.01) ipaexg.ttf -|--IPAex明朝(Ver.004.01) ipaexm.ttf - - -「IPAフォント」は、IPAの登録商標です。 - -========================= -IPAex Font --- Readme -- - -IPAex Fonts are JIS X 0213:2012 compliant OpenType fonts based on TrueType outlines. - -In using IPAex fonts, please comply with the terms and conditions set out in "IPA Font License Agreement v1.0" included in this package. -Any use, reproduction or distribution of the IPA Font or any exercise of rights under "IPA Font License Agreement v1.0" by a Recipient constitutes the Recipient's acceptance of the License Agreement. - - -IPAex Fonts 2 fonts package (IPAex Gothic、IPAex Mincho) IPAexfont00401.zip -|--Readme Readme_IPAexfont00401.txt -|--IPA Font License Agreement v1.0 IPA_Font_License_Agreement_v1.0.txt -|--IPAexGothic(Ver.004.01) ipaexg.ttf -|--IPAexMincho(Ver.004.01) ipaexm.ttf - - -"IPA Font" is a registered trademark of IPA in Japan. diff --git a/examples/fonts/ipaexg.ttf b/examples/fonts/ipaexg.ttf deleted file mode 100644 index 811b9c0..0000000 Binary files a/examples/fonts/ipaexg.ttf and /dev/null differ diff --git a/examples/fonts/ipaexm.ttf b/examples/fonts/ipaexm.ttf deleted file mode 100644 index 2aa4242..0000000 Binary files a/examples/fonts/ipaexm.ttf and /dev/null differ diff --git a/examples/img/AdjustDisplayByArray.png b/examples/img/AdjustDisplayByArray.png index b4cf80b..db3bec5 100644 Binary files a/examples/img/AdjustDisplayByArray.png and b/examples/img/AdjustDisplayByArray.png differ diff --git a/examples/img/AdjustDisplayByMethods.png b/examples/img/AdjustDisplayByMethods.png index b56a2c1..40ab8db 100644 Binary files a/examples/img/AdjustDisplayByMethods.png and b/examples/img/AdjustDisplayByMethods.png differ diff --git a/examples/img/AdjustDisplayByNeon.png b/examples/img/AdjustDisplayByNeon.png index 9140848..7764dc2 100644 Binary files a/examples/img/AdjustDisplayByNeon.png and b/examples/img/AdjustDisplayByNeon.png differ diff --git a/examples/img/BasicUsage.png b/examples/img/BasicUsage.png index 7a5d064..854c31c 100644 Binary files a/examples/img/BasicUsage.png and b/examples/img/BasicUsage.png differ diff --git a/examples/img/Matrix00.png b/examples/img/Matrix00.png index b837cd2..979984d 100644 Binary files a/examples/img/Matrix00.png and b/examples/img/Matrix00.png differ diff --git a/examples/img/Matrix01.png b/examples/img/Matrix01.png index f2ae5e3..e7047d9 100644 Binary files a/examples/img/Matrix01.png and b/examples/img/Matrix01.png differ diff --git a/examples/img/Matrix02.png b/examples/img/Matrix02.png index f52f68c..a29cb3d 100644 Binary files a/examples/img/Matrix02.png and b/examples/img/Matrix02.png differ diff --git a/examples/img/Matrix03.png b/examples/img/Matrix03.png index 395c34c..3e39184 100644 Binary files a/examples/img/Matrix03.png and b/examples/img/Matrix03.png differ diff --git a/examples/img/Matrix04.png b/examples/img/Matrix04.png index 1f4609d..e5ec247 100644 Binary files a/examples/img/Matrix04.png and b/examples/img/Matrix04.png differ diff --git a/examples/img/Matrix05.png b/examples/img/Matrix05.png index 9f9d695..ecefbdd 100644 Binary files a/examples/img/Matrix05.png and b/examples/img/Matrix05.png differ diff --git a/examples/img/Matrix06.png b/examples/img/Matrix06.png index 8609b50..0b75239 100644 Binary files a/examples/img/Matrix06.png and b/examples/img/Matrix06.png differ diff --git a/examples/img/Matrix07.png b/examples/img/Matrix07.png index b0f7a92..38fd3f0 100644 Binary files a/examples/img/Matrix07.png and b/examples/img/Matrix07.png differ diff --git a/examples/img/Matrix08.png b/examples/img/Matrix08.png index d311127..6e7495a 100644 Binary files a/examples/img/Matrix08.png and b/examples/img/Matrix08.png differ diff --git a/examples/img/Matrix09.png b/examples/img/Matrix09.png index dd64b12..5b176cd 100644 Binary files a/examples/img/Matrix09.png and b/examples/img/Matrix09.png differ diff --git a/examples/img/Matrix10.png b/examples/img/Matrix10.png index 80f4a04..36b6b5b 100644 Binary files a/examples/img/Matrix10.png and b/examples/img/Matrix10.png differ diff --git a/examples/img/Matrix11.png b/examples/img/Matrix11.png index d91eb0b..a42bc4b 100644 Binary files a/examples/img/Matrix11.png and b/examples/img/Matrix11.png differ diff --git a/examples/img/Matrix12.png b/examples/img/Matrix12.png index d30be4e..a6030e2 100644 Binary files a/examples/img/Matrix12.png and b/examples/img/Matrix12.png differ diff --git a/examples/img/Matrix13.png b/examples/img/Matrix13.png index 60df4db..5fd7955 100644 Binary files a/examples/img/Matrix13.png and b/examples/img/Matrix13.png differ diff --git a/examples/img/Matrix14.png b/examples/img/Matrix14.png index 2ebf61f..4af5168 100644 Binary files a/examples/img/Matrix14.png and b/examples/img/Matrix14.png differ diff --git a/examples/img/TransparentBackground.png b/examples/img/TransparentBackground.png index adfdcf7..a9367a0 100644 Binary files a/examples/img/TransparentBackground.png and b/examples/img/TransparentBackground.png differ diff --git a/examples/img/UsingLayers.png b/examples/img/UsingLayers.png index 1aba611..410e936 100644 Binary files a/examples/img/UsingLayers.png and b/examples/img/UsingLayers.png differ diff --git a/phpmd.xml b/phpmd.xml deleted file mode 100644 index bc07190..0000000 --- a/phpmd.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - Custom ruleset PHPMD - - - - - - - - - - - - - diff --git a/src/Analyzer.php b/src/Analyzer.php index aac5785..df4ef4a 100644 --- a/src/Analyzer.php +++ b/src/Analyzer.php @@ -37,9 +37,8 @@ public function __construct() /** * calculates mean of $data * @param array $data - * @return float|null */ - public function mean(array $data) + public function mean(array $data): ?float { if (!self::isValidData($data)) { return null; @@ -50,9 +49,8 @@ public function mean(array $data) /** * calculates variance of $data * @param array $data - * @return float|null */ - public function variance(array $data) + public function variance(array $data): ?float { if (!self::isValidData($data)) { return null; @@ -69,9 +67,8 @@ public function variance(array $data) * calculates covariance of $dataX and $dataY * @param array $dataX * @param array $dataY - * @return float|null */ - public function covariance(array $dataX, array $dataY) + public function covariance(array $dataX, array $dataY): ?float { if (!self::isValidData($dataX) || !self::isValidData($dataY)) { return null; @@ -92,9 +89,8 @@ public function covariance(array $dataX, array $dataY) /** * calculates standard deviation of $data * @param array $data - * @return float|null */ - public function standardDeviation(array $data) + public function standardDeviation(array $data): ?float { if (!self::isValidData($data)) { return null; @@ -106,9 +102,8 @@ public function standardDeviation(array $data) * calculates correlation coefficient of $dataX and $dataY * @param array $dataX * @param array $dataY - * @return float|null */ - public function correlationCoefficient(array $dataX, array $dataY) + public function correlationCoefficient(array $dataX, array $dataY): ?float { if (!self::isValidData($dataX) || !self::isValidData($dataY)) { return null; @@ -130,7 +125,7 @@ public function correlationCoefficient(array $dataX, array $dataY) * @param array $dataY * @return array|null */ - public function regressionLineFormula(array $dataX, array $dataY) + public function regressionLineFormula(array $dataX, array $dataY): ?array { if (!self::isValidData($dataX) || !self::isValidData($dataY)) { return null; @@ -161,9 +156,8 @@ public function regressionCurveFormula($dataX, $dataY) /** * calculates the upper control limit of $data * @param array $data - * @return float|null */ - public function getUcl(array $data) + public function getUcl(array $data): ?float { if (!self::isValidData($data)) { return null; @@ -183,9 +177,8 @@ public function getUcl(array $data) /** * calculates the lower control limit of $data * @param array $data - * @return float|null */ - public function getLcl(array $data) + public function getLcl(array $data): ?float { if (!self::isValidData($data)) { return null; @@ -207,7 +200,7 @@ public function getLcl(array $data) * @param array $data * @return array|null */ - public function outliers(array $data) + public function outliers(array $data): ?array { if (!self::isValidData($data)) { return null; @@ -234,7 +227,7 @@ public function outliers(array $data) * @param array>> $layers * @return array|null */ - public function layerMax(array $layers) + public function layerMax(array $layers): ?array { if (!self::isValidLayers($layers)) { return null; @@ -253,7 +246,7 @@ public function layerMax(array $layers) * @param array>> $layers * @return array|null */ - public function layerMin(array $layers) + public function layerMin(array $layers): ?array { if (!self::isValidLayers($layers)) { return null; @@ -272,7 +265,7 @@ public function layerMin(array $layers) * @param array>> $layers * @return array>|null */ - public function parse(array $layers) + public function parse(array $layers): ?array { if (!self::isValidLayers($layers)) { return null; diff --git a/src/Enums/Align.php b/src/Enums/Align.php new file mode 100644 index 0000000..2d27433 --- /dev/null +++ b/src/Enums/Align.php @@ -0,0 +1,34 @@ +value => Alignment::LEFT, + self::Center->value => Alignment::CENTER, + self::Right->value => Alignment::RIGHT, + self::Top->value => Alignment::TOP, + self::Middle->value => Alignment::CENTER, + self::Bottom->value => Alignment::BOTTOM, + default => null, + }; + } +} diff --git a/src/Enums/ImageDriver.php b/src/Enums/ImageDriver.php new file mode 100644 index 0000000..3b9c679 --- /dev/null +++ b/src/Enums/ImageDriver.php @@ -0,0 +1,26 @@ + 'Intervention\Image\Drivers\Gd\Driver', + self::Imagick => 'Intervention\Image\Drivers\Imagick\Driver', + self::Vips => 'Intervention\Image\Drivers\Vips\Driver', + }; + } +} diff --git a/src/Helpers/Color.php b/src/Helpers/Color.php new file mode 100644 index 0000000..c85ed9e --- /dev/null +++ b/src/Helpers/Color.php @@ -0,0 +1,14 @@ +>> $layers @@ -54,14 +58,14 @@ public function __construct() { parent::__construct(); $this->loadConf(); - $this->imageManager = ImageManager::{$this->imageDriver}(); + $imageDriver = ImageDriver::tryFrom($this->imageDriver)->classname(); + $this->imageManager = ImageManager::usingDriver($imageDriver); } /** * loads config. - * @return void */ - private function loadConf() + private function loadConf(): void { Config::load(); $props = [ @@ -141,9 +145,8 @@ private function loadConf() /** * sets properties for preparation - * @return self */ - private function setProperties() + private function setProperties(): self { $this->ft = new FrequencyTable(); $this->legendCount = count($this->layers); @@ -202,7 +205,7 @@ private function setProperties() } } // Creating an instance of intervention/image. - $this->image = $this->imageManager->create($this->canvasWidth, $this->canvasHeight); + $this->image = $this->imageManager->createImage($this->canvasWidth, $this->canvasHeight); if (self::isColorCode($this->canvasBackgroundColor)) { $this->image = $this->image->fill($this->canvasBackgroundColor); } @@ -218,29 +221,24 @@ private function setProperties() /** * calculates the x-coordinate in pixels - * @param float $x - * @return int */ - private function pX(float $x) + private function pX(float $x): int { return (int) ($this->baseX + ($x - $this->gridXMin) * $this->pixPitchX); } /** * calculates the y-coordinate in pixels - * @param float $y - * @return int */ - private function pY(float $y) + private function pY(float $y): int { return (int) ($this->baseY - ($y - $this->gridYMin) * $this->pixPitchY); } /** * plots axis - * @return self */ - private function plotAxis() + private function plotAxis(): self { // horizontal axis $x1 = (int) $this->pX($this->gridXMin); @@ -251,7 +249,7 @@ private function plotAxis() function (LineFactory $line) use ($x1, $y1, $x2, $y2) { $line->from($x1, $y1); $line->to($x2, $y2); - $line->color($this->axisColor); + $line->color(Color::parse($this->axisColor)); $line->width($this->axisWidth); } ); @@ -264,7 +262,7 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { function (LineFactory $line) use ($x1, $y1, $x2, $y2) { $line->from($x1, $y1); $line->to($x2, $y2); - $line->color($this->axisColor); + $line->color(Color::parse($this->axisColor)); $line->width($this->axisWidth); } ); @@ -273,9 +271,8 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { /** * plots x-grids - * @return self */ - private function plotGridsX() + private function plotGridsX(): self { if (!$this->gridX) { return $this; @@ -289,7 +286,7 @@ private function plotGridsX() function (LineFactory $line) use ($x1, $y1, $x2, $y2) { $line->from($x1, $y1); $line->to($x2, $y2); - $line->color($this->gridColor); + $line->color(Color::parse($this->gridColor)); $line->width($this->gridWidth); } ); @@ -299,9 +296,8 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { /** * plots y-grids - * @return self */ - private function plotGridsY() + private function plotGridsY(): self { if (!$this->gridY) { return $this; @@ -315,7 +311,7 @@ private function plotGridsY() function (LineFactory $line) use ($x1, $y1, $x2, $y2) { $line->from($x1, $y1); $line->to($x2, $y2); - $line->color($this->gridColor); + $line->color(Color::parse($this->gridColor)); $line->width($this->gridWidth); } ); @@ -325,9 +321,8 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { /** * plots grid values of x - * @return self */ - private function plotGridValuesX() + private function plotGridValuesX(): self { for ($i = $this->gridXMin; $i <= $this->gridXMax; $i += $this->gridXPitch) { $x = $this->pX($i); @@ -339,9 +334,8 @@ private function plotGridValuesX() function (FontFactory $font) { $font->filename($this->fontPath); $font->size($this->fontSize); - $font->color($this->fontColor); - $font->align('center'); - $font->valign('bottom'); + $font->color(Color::parse($this->fontColor)); + $font->align(Align::parse('center'), Align::parse('bottom')); } ); } @@ -350,9 +344,8 @@ function (FontFactory $font) { /** * plots grid values of y - * @return self */ - private function plotGridValuesY() + private function plotGridValuesY(): self { for ($i = $this->gridYMin; $i <= $this->gridYMax; $i += $this->gridYPitch) { $x = (int) ($this->baseX - $this->fontSize * 0.4); @@ -364,9 +357,8 @@ private function plotGridValuesY() function (FontFactory $font) { $font->filename($this->fontPath); $font->size($this->fontSize); - $font->color($this->fontColor); - $font->align('right'); - $font->valign('bottom'); + $font->color(Color::parse($this->fontColor)); + $font->align(Align::parse('right'), Align::parse('bottom')); } ); } @@ -375,9 +367,8 @@ function (FontFactory $font) { /** * plots x-label - * @return self */ - private function plotLabelX() + private function plotLabelX(): self { $x = (int) ($this->canvasWidth / 2); $y = (int) ($this->baseY + (1 - $this->frameYRatio) * $this->canvasHeight / 3); @@ -388,9 +379,8 @@ private function plotLabelX() function (FontFactory $font) { $font->filename($this->fontPath); $font->size($this->fontSize); - $font->color($this->fontColor); - $font->align('center'); - $font->valign('bottom'); + $font->color(Color::parse($this->fontColor)); + $font->align(Align::parse('center'), Align::parse('bottom')); } ); return $this; @@ -398,13 +388,12 @@ function (FontFactory $font) { /** * plots y-label - * @return self */ - private function plotLabelY() + private function plotLabelY(): self { $width = $this->canvasHeight; $height = (int) ($this->canvasWidth * (1 - $this->frameXRatio) / 3); - $image = $this->imageManager->create($width, $height); + $image = $this->imageManager->createImage($width, $height); $x = (int) ($width / 2); $y = (int) (($height + $this->fontSize) / 2); $image->text( @@ -414,21 +403,19 @@ private function plotLabelY() function (FontFactory $font) { $font->filename($this->fontPath); $font->size($this->fontSize); - $font->color($this->fontColor); - $font->align('center'); - $font->valign('bottom'); + $font->color(Color::parse($this->fontColor)); + $font->align(Align::parse('center'), Align::parse('bottom')); } ); $image->rotate(90); - $this->image->place($image, 'left'); + $this->image->insert(image: $image, alignment: Align::parse('left')); return $this; } /** * plots caption - * @return self */ - private function plotCaption() + private function plotCaption(): self { $x = (int) ($this->canvasWidth / 2); $y = (int) ($this->canvasHeight * (1 - $this->frameYRatio) / 3); @@ -439,9 +426,8 @@ private function plotCaption() function (FontFactory $font) { $font->filename($this->fontPath); $font->size($this->fontSize); - $font->color($this->fontColor); - $font->align('center'); - $font->valign('bottom'); + $font->color(Color::parse($this->fontColor)); + $font->align(Align::parse('center'), Align::parse('bottom')); } ); return $this; @@ -449,9 +435,8 @@ function (FontFactory $font) { /** * plots layers - * @return self */ - private function plotLayers() + private function plotLayers(): self { if (!self::isValidLayers($this->layers)) { return $this; @@ -470,9 +455,8 @@ private function plotLayers() /** * plots layer * @param array> $data - * @return self */ - private function plotLayer(array $data) + private function plotLayer(array $data): self { $count = count($data['x']); for ($i = 0; $i < $count; $i++) { @@ -483,11 +467,8 @@ private function plotLayer(array $data) /** * plots a dot - * @param int|float $x - * @param int|float $y - * @return self */ - private function plotXY(int|float $x, int|float $y) + private function plotXY(int|float $x, int|float $y): self { if (!self::isNumber($x) || !self::isNumber($y)) { return $this; @@ -495,11 +476,10 @@ private function plotXY(int|float $x, int|float $y) $px = $this->pX($x); $py = $this->pY($y); $this->image->drawCircle( - $px, - $py, - function (CircleFactory $circle) { + function (CircleFactory $circle) use ($px, $py) { + $circle->at($px, $py); $circle->radius((int) ($this->plotDiameter / 2)); - $circle->background($this->plotColor); + $circle->background(Color::parse($this->plotColor)); } ); return $this; @@ -508,9 +488,8 @@ function (CircleFactory $circle) { /** * plots a regression line * @param array> $layer - * @return self */ - private function plotRegressionLine(array $layer) + private function plotRegressionLine(array $layer): self { if (!$this->regressionLine) { return $this; @@ -532,7 +511,7 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { $line->from($x1, $y1); $line->to($x2, $y2); $line->width($this->regressionLineWidth); - $line->color($this->regressionLineColor); + $line->color(Color::parse($this->regressionLineColor)); } ); return $this; @@ -540,9 +519,8 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { /** * plots a reference line of x - * @return self */ - private function plotReferenceLineX() + private function plotReferenceLineX(): self { if (!$this->referenceLineX) { return $this; @@ -556,7 +534,7 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { $line->from($x1, $y1); $line->to($x2, $y2); $line->width($this->referenceLineXWidth); - $line->color($this->referenceLineXColor); + $line->color(Color::parse($this->referenceLineXColor)); } ); return $this; @@ -564,9 +542,8 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { /** * plots a reference line of Y - * @return self */ - private function plotReferenceLineY() + private function plotReferenceLineY(): self { if (!$this->referenceLineY) { return $this; @@ -580,7 +557,7 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { $line->from($x1, $y1); $line->to($x2, $y2); $line->width($this->referenceLineYWidth); - $line->color($this->referenceLineYColor); + $line->color(Color::parse($this->referenceLineYColor)); } ); return $this; @@ -588,9 +565,8 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { /** * plots specification limit lines of X - * @return self */ - private function plotSpecificationLimitX() + private function plotSpecificationLimitX(): self { if (!$this->specificationLimitX) { return $this; @@ -605,7 +581,7 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { $line->from($x1, $y1); $line->to($x2, $y2); $line->width($this->specificationLimitXWidth); - $line->color($this->specificationLimitXColor); + $line->color(Color::parse($this->specificationLimitXColor)); } ); // upper limit @@ -616,7 +592,7 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { $line->from($x1, $y1); $line->to($x2, $y2); $line->width($this->specificationLimitXWidth); - $line->color($this->specificationLimitXColor); + $line->color(Color::parse($this->specificationLimitXColor)); } ); return $this; @@ -624,9 +600,8 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { /** * plots specification limit lines of y - * @return self */ - private function plotSpecificationLimitY() + private function plotSpecificationLimitY(): self { if (!$this->specificationLimitY) { return $this; @@ -641,7 +616,7 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { $line->from($x1, $y1); $line->to($x2, $y2); $line->width($this->specificationLimitYWidth); - $line->color($this->specificationLimitYColor); + $line->color(Color::parse($this->specificationLimitYColor)); } ); // upper limit @@ -652,7 +627,7 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { $line->from($x1, $y1); $line->to($x2, $y2); $line->width($this->specificationLimitYWidth); - $line->color($this->specificationLimitYColor); + $line->color(Color::parse($this->specificationLimitYColor)); } ); return $this; @@ -660,9 +635,8 @@ function (LineFactory $line) use ($x1, $y1, $x2, $y2) { /** * plots legends - * @return self */ - private function plotLegend() + private function plotLegend(): self { if (!$this->legend) { return $this; @@ -674,12 +648,11 @@ private function plotLegend() $x2 = $x1 + $this->legendWidth; $y2 = (int) ($y1 + $this->legendFontSize * 1.2 * $this->legendCount + 8); $this->image->drawRectangle( - $x1, - $y1, function (RectangleFactory $rectangle) use ($x1, $y1, $x2, $y2) { + $rectangle->at($x1, $y1); $rectangle->size($x2 - $x1, $y2 - $y1); - $rectangle->background($this->canvasBackgroundColor); - $rectangle->border($this->axisColor, $this->axisWidth); + $rectangle->background(Color::parse($this->canvasBackgroundColor)); + $rectangle->border(Color::parse($this->axisColor), $this->axisWidth); } ); for ($i = 0; $i < $this->legendCount; $i++) { @@ -693,12 +666,11 @@ function (RectangleFactory $rectangle) use ($x1, $y1, $x2, $y2) { $x2 = (int) ($x1 + 20); $y2 = (int) ($y1 + $this->legendFontSize); $this->image->drawRectangle( - $x1, - $y1, function (RectangleFactory $rectangle) use ($i, $x1, $y1, $x2, $y2) { + $rectangle->at($x1, $y1); $rectangle->size($x2 - $x1, $y2 - $y1); - $rectangle->background($this->colors[$i]); - $rectangle->border($this->axisColor, 1); + $rectangle->background(Color::parse($this->colors[$i])); + $rectangle->border(Color::parse($this->axisColor), 1); } ); $x = $x2 + 4; @@ -710,9 +682,8 @@ function (RectangleFactory $rectangle) use ($i, $x1, $y1, $x2, $y2) { function (FontFactory $font) { $font->filename($this->fontPath); $font->size($this->legendFontSize); - $font->color($this->fontColor); - $font->align('left'); - $font->valign('top'); + $font->color(Color::parse($this->fontColor)); + $font->align(Align::parse('left'), Align::parse('top')); } ); } @@ -721,11 +692,9 @@ function (FontFactory $font) { /** * creates a scatter plot image and save it - * @param string $filePath - * @return self * @thrown \Exception */ - public function create(string $filePath) + public function create(string $filePath): self { if (strlen($filePath) == 0) { throw new \Exception("Empty string specified for file path."); diff --git a/src/Scatterplot.php b/src/Scatterplot.php index 5ba6531..641abd9 100644 --- a/src/Scatterplot.php +++ b/src/Scatterplot.php @@ -23,9 +23,8 @@ public function __construct() /** * loads config. - * @return void */ - private function loadConf() + private function loadConf(): void { Config::load(); $props = [ @@ -42,9 +41,8 @@ private function loadConf() /** * set config from specified resource * @param string|mixed[] $configResource - * @return self */ - public function config(string|array $configResource) + public function config(string|array $configResource): self { foreach (Config::filter($configResource) as $key => $value) { $this->{$key} = $value; @@ -58,9 +56,8 @@ public function config(string|array $configResource) /** * sets a layer * @param array> $layer - * @return self */ - public function layer(array $layer) + public function layer(array $layer): self { if (self::isValidLayer($layer)) { $this->layers[] = $layer; @@ -71,9 +68,8 @@ public function layer(array $layer) /** * sets layers * @param array>> $layers - * @return self */ - public function layers(array $layers) + public function layers(array $layers): self { if (!self::isValidLayers($layers)) { throw new \Exception( @@ -87,10 +83,8 @@ public function layers(array $layers) /** * returns the config values - * @param string|null $key = null - * @return mixed */ - public function getConfig(string|null $key = null) + public function getConfig(string|null $key = null): mixed { if (is_null($key)) { $config = []; diff --git a/src/Traits/AttributeTrait.php b/src/Traits/AttributeTrait.php index e0764cb..511bae1 100644 --- a/src/Traits/AttributeTrait.php +++ b/src/Traits/AttributeTrait.php @@ -25,12 +25,9 @@ trait AttributeTrait /** * sets limits of x - * @param int|float $lower - * @param int|float $upper - * @return self * @thrown \Exception */ - public function limitX(int|float $lower, int|float $upper) + public function limitX(int|float $lower, int|float $upper): self { if ($lower >= $upper) { throw new \Exception("lower limit must be less than upper limit."); @@ -42,12 +39,9 @@ public function limitX(int|float $lower, int|float $upper) /** * sets limits of y - * @param int|float $lower - * @param int|float $upper - * @return self * @thrown \Exception */ - public function limitY(int|float $lower, int|float $upper) + public function limitY(int|float $lower, int|float $upper): self { if ($lower >= $upper) { throw new \Exception("lower limit must be less than upper limit."); @@ -59,12 +53,9 @@ public function limitY(int|float $lower, int|float $upper) /** * sets the width and height of the canvas - * @param int $width - * @param int $height - * @return self * @thrown \Exception */ - public function resize(int $width, int $height) + public function resize(int $width, int $height): self { if ($width < $this->CANVAS_WIDTH_LIMIT_LOWER) { throw new \Exception( @@ -85,12 +76,9 @@ public function resize(int $width, int $height) /** * sets the frame (plot area) ratio - * @param float $xRatio (0.0 < $xRatio < 1.0) - * @param float $yRatio (0.0 < $yRatio < 1.0) - * @return self * @thrown \Exception */ - public function frame($xRatio, $yRatio) + public function frame(float $xRatio, float $yRatio): self { if ($xRatio <= 0.0 || $xRatio > 1.0) { throw new \Exception("Ratio must be: 0.0 < ratio <= 1.0."); @@ -105,10 +93,8 @@ public function frame($xRatio, $yRatio) /** * sets the label of x - * @param string $label - * @return self */ - public function labelX(string $label) + public function labelX(string $label): self { $this->labelX = $label; return $this; @@ -116,10 +102,8 @@ public function labelX(string $label) /** * sets the label of y - * @param string $label - * @return self */ - public function labelY(string $label) + public function labelY(string $label): self { $this->labelY = $label; return $this; @@ -127,10 +111,8 @@ public function labelY(string $label) /** * sets the caption - * @param string $caption - * @return self */ - public function caption(string $caption) + public function caption(string $caption): self { $this->caption = $caption; return $this; @@ -139,9 +121,8 @@ public function caption(string $caption) /** * sets the legends * @param string[] $legends - * @return self */ - public function legends(array $legends) + public function legends(array $legends): self { if (!self::isStringsAll($legends)) { throw new \Exception("Each elements of legends must be type of string."); diff --git a/src/Traits/EnumTrait.php b/src/Traits/EnumTrait.php new file mode 100644 index 0000000..d5e7513 --- /dev/null +++ b/src/Traits/EnumTrait.php @@ -0,0 +1,60 @@ +value, $value) === 0) { + return $case; + } + } + return null; + } +} diff --git a/src/Traits/JudgeTrait.php b/src/Traits/JudgeTrait.php index 227ec03..3600bdc 100644 --- a/src/Traits/JudgeTrait.php +++ b/src/Traits/JudgeTrait.php @@ -7,7 +7,6 @@ trait JudgeTrait /** * judges if all items are integer or not * @param array $items - * @return bool */ public static function isIntAll(array $items): bool { @@ -24,8 +23,6 @@ public static function isIntAll(array $items): bool /** * judges if the param is number - * @param mixed $item - * @return bool */ public static function isNumber(mixed $item): bool { @@ -34,8 +31,6 @@ public static function isNumber(mixed $item): bool /** * judges if all items are number or not - * @param mixed $items - * @return bool */ public static function isNumbersAll(mixed $items): bool { @@ -55,8 +50,6 @@ public static function isNumbersAll(mixed $items): bool /** * judges if all items are string or not - * @param mixed $items - * @return bool */ public static function isStringsAll(mixed $items): bool { @@ -76,8 +69,6 @@ public static function isStringsAll(mixed $items): bool /** * judges if the param is in '#rrggbb' format or not - * @param mixed $item - * @return bool */ public static function isColorCode(mixed $item): bool { @@ -89,8 +80,6 @@ public static function isColorCode(mixed $item): bool /** * judges if all of params are colorcode or not - * @param mixed $colors - * @return bool */ public static function isColorCodesAll(mixed $colors): bool { @@ -110,9 +99,6 @@ public static function isColorCodesAll(mixed $colors): bool /** * judges if type of $input is valid or not - * @param mixed $input - * @param string $defs - * @return bool */ public static function isValidType(mixed $input, string $defs): bool { @@ -136,8 +122,6 @@ public static function isValidType(mixed $input, string $defs): bool /** * judgees whether $data is valid or not for analysis - * @param mixed $data - * @return bool */ public static function isValidData(mixed $data): bool { @@ -156,7 +140,6 @@ public static function isValidData(mixed $data): bool /** * judges whether $layer is valid or not * @param array> $layer - * @return bool */ public static function isValidLayer(array $layer): bool { @@ -184,7 +167,6 @@ public static function isValidLayer(array $layer): bool /** * judges whether $layers is valid or not * @param array>> $layers - * @return bool */ public static function isValidLayers(array $layers): bool { diff --git a/src/Traits/StyleAppendixTrait.php b/src/Traits/StyleAppendixTrait.php index f69d39a..4448dca 100644 --- a/src/Traits/StyleAppendixTrait.php +++ b/src/Traits/StyleAppendixTrait.php @@ -46,14 +46,13 @@ trait StyleAppendixTrait /** * sets x, width and color of the reference line of x - * @param int|float $x - * @param int $width - * @param string $color = '#0000ff' - * @return self * @thrown \Exception */ - public function referenceLineX(int|float $x, int $width = 1, string $color = '#0000ff') - { + public function referenceLineX( + int|float $x, + int $width = 1, + string $color = '#0000ff', + ): self { if ($width < 1) { throw new \Exception("Width must be positive integer."); } @@ -69,14 +68,13 @@ public function referenceLineX(int|float $x, int $width = 1, string $color = '#0 /** * sets y, width and color of the reference line of y - * @param int|float $y - * @param int $width - * @param string $color = '#0000ff' - * @return self * @thrown \Exception */ - public function referenceLineY(int|float $y, int $width = 1, string $color = '#0000ff') - { + public function referenceLineY( + int|float $y, + int $width = 1, + string $color = '#0000ff', + ): self { if ($width < 1) { throw new \Exception("Width must be positive integer."); } @@ -92,15 +90,14 @@ public function referenceLineY(int|float $y, int $width = 1, string $color = '#0 /** * sets the specification limits of x - * @param int|float $lower - * @param int|float $upper - * @param int $width = 1 - * @param string $color = '#ff00ff' - * @return self * @thrown \Exception */ - public function specificationLimitX(int|float $lower, int|float $upper, int $width = 1, string $color = '#ff00ff') - { + public function specificationLimitX( + int|float $lower, + int|float $upper, + int $width = 1, + string $color = '#ff00ff', + ): self { if ($lower >= $upper) { throw new \Exception("The lower and upper limits are opposite in size."); } @@ -108,7 +105,7 @@ public function specificationLimitX(int|float $lower, int|float $upper, int $wid throw new \Exception("Width must be positive integer."); } if (!self::isColorCode($color)) { - throw new \Exception("Color code msut be in '#rgb' or '#rrggbb' format."); + throw new \Exception("Color code must be in '#rgb' or '#rrggbb' format."); } $this->specificationLimitX = true; $this->specificationLimitXLower = $lower; @@ -120,15 +117,14 @@ public function specificationLimitX(int|float $lower, int|float $upper, int $wid /** * sets the specification limits of y - * @param int|float $lower - * @param int|float $upper - * @param int $width = 1 - * @param string $color = '#ff00ff' - * @return self * @thrown \Exception */ - public function specificationLimitY(int|float $lower, int|float $upper, int $width = 1, string $color = '#ff00ff') - { + public function specificationLimitY( + int|float $lower, + int|float $upper, + int $width = 1, + string $color = '#ff00ff', + ): self { if ($lower >= $upper) { throw new \Exception("The lower and upper limits are opposite in size."); } @@ -136,7 +132,7 @@ public function specificationLimitY(int|float $lower, int|float $upper, int $wid throw new \Exception("Width must be positive integer."); } if (!self::isColorCode($color)) { - throw new \Exception("Color code msut be in '#rgb' or '#rrggbb' format."); + throw new \Exception("Color code must be in '#rgb' or '#rrggbb' format."); } $this->specificationLimitY = true; $this->specificationLimitYLower = $lower; @@ -148,12 +144,10 @@ public function specificationLimitY(int|float $lower, int|float $upper, int $wid /** * sets the width and color of the regression line - * @param int $width * @param string[] $colors - * @return self * @thrown \Exception */ - public function regressionLine(int $width, array $colors) + public function regressionLine(int $width, array $colors): self { if ($width < 1) { throw new \Exception("Width must be positive integer."); diff --git a/src/Traits/StyleCoreTrait.php b/src/Traits/StyleCoreTrait.php index 2f568ee..2b7d0b2 100644 --- a/src/Traits/StyleCoreTrait.php +++ b/src/Traits/StyleCoreTrait.php @@ -33,10 +33,8 @@ trait StyleCoreTrait /** * sets the background color of the canvas - * @param string|null $color = null (null results in transparent) - * @return self */ - public function bgcolor(string|null $color = null) + public function bgcolor(string|null $color = null): self { if (!self::isColorCode($color) && !is_null($color)) { throw new \Exception("param must be null or color code (in '#rgb' or '#rrggbb' format)."); @@ -47,12 +45,9 @@ public function bgcolor(string|null $color = null) /** * sets the width and color of the axis - * @param int $width - * @param string|null $color - * @return self * @thrown \Exception */ - public function axis(int $width, string|null $color = null) + public function axis(int $width, string|null $color = null): self { if ($width < 1) { throw new \Exception("width must be positive integer."); @@ -69,12 +64,9 @@ public function axis(int $width, string|null $color = null) /** * sets the width and color of the grids - * @param int $width - * @param string|null $color - * @return self * @thrown \Exception */ - public function grid(int $width, string|null $color = null) + public function grid(int $width, string|null $color = null): self { if ($width < 1) { throw new \Exception("width must be positive integer."); @@ -91,10 +83,8 @@ public function grid(int $width, string|null $color = null) /** * sets the grid pitch of x - * @param int|float $pitch - * @return self */ - public function gridXPitch(int|float $pitch) + public function gridXPitch(int|float $pitch): self { if ($pitch <= 0) { throw new \Exception("specify positive integer."); @@ -105,10 +95,8 @@ public function gridXPitch(int|float $pitch) /** * sets the grid pitch of y - * @param int|float $pitch - * @return self */ - public function gridYPitch(int|float $pitch) + public function gridYPitch(int|float $pitch): self { if ($pitch <= 0) { throw new \Exception("specify positive integer."); @@ -120,10 +108,9 @@ public function gridYPitch(int|float $pitch) /** * sets the color of dots * @param string[] $colors - * @return self * @thrown \Exception */ - public function colors(array $colors) + public function colors(array $colors): self { if (!self::isColorCodesAll($colors)) { throw new \Exception("color codes must be in '#rgb' or '#rrggbb' format."); @@ -138,11 +125,9 @@ public function colors(array $colors) /** * sets the size (diameter) of dots in pixels - * @param int $size - * @return self * @thrown \Exception */ - public function plotSize(int $size) + public function plotSize(int $size): self { if ($size < 1) { throw new \Exception("size must be positive integer."); @@ -153,11 +138,9 @@ public function plotSize(int $size) /** * sets the font path - * @param string $path - * @return self * @thrown \Exception */ - public function fontPath(string $path) + public function fontPath(string $path): self { if (!file_exists($path)) { throw new \Exception("File does not exists."); @@ -175,11 +158,9 @@ public function fontPath(string $path) /** * sets the font size - * @param int|float $size - * @return self * @thrown \Exception */ - public function fontSize(int|float $size) + public function fontSize(int|float $size): self { if ($size < 6) { throw new \Exception("Size must be 6 or above."); @@ -190,11 +171,9 @@ public function fontSize(int|float $size) /** * sets the font color - * @param string $color - * @return self * @thrown \Exception */ - public function fontColor(string $color) + public function fontColor(string $color): self { if (!self::isColorCode($color)) { throw new \Exception("Color code must be in '#rgb' or '#rrggbb' format."); diff --git a/src/Traits/VisibilityAppendixTrait.php b/src/Traits/VisibilityAppendixTrait.php index bf1e766..c3c956b 100644 --- a/src/Traits/VisibilityAppendixTrait.php +++ b/src/Traits/VisibilityAppendixTrait.php @@ -14,9 +14,8 @@ trait VisibilityAppendixTrait /** * sets reference line of x off - * @return self */ - public function referenceLineXOff() + public function referenceLineXOff(): self { $this->referenceLineX = false; return $this; @@ -24,9 +23,8 @@ public function referenceLineXOff() /** * sets reference line of y off - * @return self */ - public function referenceLineYOff() + public function referenceLineYOff(): self { $this->referenceLineY = false; return $this; @@ -34,9 +32,8 @@ public function referenceLineYOff() /** * sets reference lines off - * @return self */ - public function referenceLinesOff() + public function referenceLinesOff(): self { $this->referenceLineXOff(); $this->referenceLineYOff(); @@ -45,9 +42,8 @@ public function referenceLinesOff() /** * sets specification limit of x off - * @return self */ - public function specificationLimitXOff() + public function specificationLimitXOff(): self { $this->specificationLimitX = false; return $this; @@ -55,9 +51,8 @@ public function specificationLimitXOff() /** * sets specification limit of y off - * @return self */ - public function specificationLimitYOff() + public function specificationLimitYOff(): self { $this->specificationLimitY = false; return $this; @@ -65,9 +60,8 @@ public function specificationLimitYOff() /** * sets specification limits off - * @return self */ - public function specificationLimitsOff() + public function specificationLimitsOff(): self { $this->specificationLimitXOff(); $this->specificationLimitYOff(); @@ -76,9 +70,8 @@ public function specificationLimitsOff() /** * sets regression line on - * @return self */ - public function regressionLineOn() + public function regressionLineOn(): self { $this->regressionLine = true; return $this; @@ -86,9 +79,8 @@ public function regressionLineOn() /** * sets regression line off - * @return self */ - public function regressionLineOff() + public function regressionLineOff(): self { $this->regressionLine = false; return $this; diff --git a/src/Traits/VisibilityCoreTrait.php b/src/Traits/VisibilityCoreTrait.php index 200db4e..4009cb1 100644 --- a/src/Traits/VisibilityCoreTrait.php +++ b/src/Traits/VisibilityCoreTrait.php @@ -9,9 +9,8 @@ trait VisibilityCoreTrait /** * sets grid of x on - * @return self */ - public function gridXOn() + public function gridXOn(): self { $this->gridX = true; return $this; @@ -19,9 +18,8 @@ public function gridXOn() /** * sets grid of x off - * @return self */ - public function gridXOff() + public function gridXOff(): self { $this->gridX = false; return $this; @@ -29,9 +27,8 @@ public function gridXOff() /** * sets grid of y on - * @return self */ - public function gridYOn() + public function gridYOn(): self { $this->gridY = true; return $this; @@ -39,9 +36,8 @@ public function gridYOn() /** * sets grid of y off - * @return self */ - public function gridYOff() + public function gridYOff(): self { $this->gridY = false; return $this; @@ -49,9 +45,8 @@ public function gridYOff() /** * sets legend off - * @return self */ - public function legendOff() + public function legendOff(): self { $this->legend = false; return $this; diff --git a/tests/AnalyzerTest.php b/tests/AnalyzerTest.php index aee88f0..d506aa3 100644 --- a/tests/AnalyzerTest.php +++ b/tests/AnalyzerTest.php @@ -2,16 +2,12 @@ declare(strict_types=1); -namespace Macocci7\PhpScatterplot; +namespace Macocci7\PhpScatterplot\Tests; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Macocci7\PhpScatterplot\Analyzer; -/** - * @SuppressWarnings(PHPMD.CamelCaseMethodName) - * @SuppressWarnings(PHPMD.TooManyPublicMethods) - */ final class AnalyzerTest extends TestCase { public static function provide_mean_can_return_mean_correctly(): array @@ -23,11 +19,11 @@ public static function provide_mean_can_return_mean_correctly(): array ['data' => [true], 'expect' => null, ], ['data' => [false], 'expect' => null, ], ['data' => ['0'], 'expect' => null, ], - ['data' => [1], 'expect' => 1, ], + ['data' => [1], 'expect' => 1.0, ], ['data' => [1,2], 'expect' => 1.5, ], ['data' => [1,2,'3'], 'expect' => null, ], ['data' => [1.5,2.5,3.5], 'expect' => 2.5, ], - ['data' => [1,2,3], 'expect' => 2, ], + ['data' => [1,2,3], 'expect' => 2.0, ], ['data' => [1.5,2.5,3.5,4.5], 'expect' => 3.0, ], ]; } @@ -47,12 +43,12 @@ public static function provide_variance_can_return_variance_correctly(): array ['data' => [null], 'expect' => null, ], ['data' => [true], 'expect' => null, ], ['data' => [false], 'expect' => null, ], - ['data' => [0], 'expect' => 0, ], + ['data' => [0], 'expect' => 0.0, ], ['data' => [1.2], 'expect' => 0.0, ], ['data' => ['0'], 'expect' => null, ], - ['data' => [1], 'expect' => 0, ], + ['data' => [1], 'expect' => 0.0, ], ['data' => [1,2], 'expect' => 0.25, ], - ['data' => [-1,1,3,5], 'expect' => 5, ], + ['data' => [-1,1,3,5], 'expect' => 5.0, ], ]; } @@ -78,7 +74,7 @@ public static function provide_covariance_can_return_covariance_correctly(): arr ['x' => [1], 'y' => [false], 'expect' => null, ], ['x' => [1], 'y' => ['1'], 'expect' => null, ], ['x' => [1], 'y' => [[]], 'expect' => null, ], - ['x' => [1], 'y' => [1], 'expect' => 0, ], + ['x' => [1], 'y' => [1], 'expect' => 0.0, ], ['x' => [1.5], 'y' => [1.5], 'expect' => 0.0, ], ['x' => [1,2], 'y' => [1], 'expect' => null, ], ['x' => [1,2,3], 'y' => [4,5,6], 'expect' => 2 / 3, ], diff --git a/tests/Enums/AlignTest.php b/tests/Enums/AlignTest.php new file mode 100644 index 0000000..17c1fce --- /dev/null +++ b/tests/Enums/AlignTest.php @@ -0,0 +1,64 @@ + 'left', + 'Center' => 'center', + 'Right' => 'right', + 'Top' => 'top', + 'Middle' => 'middle', + 'Bottom' => 'bottom', + ]; + + public function test_cases_can_return_cases_correctly(): void + { + $this->assertSame(array_keys($this->aligns), Align::names()); + } + + public function test_values_can_return_values_correctly(): void + { + $this->assertSame(array_values($this->aligns), Align::values()); + } + + public function test_asArray_can_return_array_correctly(): void + { + $this->assertSame($this->aligns, Align::asArray()); + } + + public function test_get_can_return_enum_correctly(): void + { + foreach ($this->aligns as $key => $value) { + $enum = Align::get($value); + $this->assertSame($key, $enum->name); + } + } + + public static function provide_parse_can_return_correct_alignment(): array + { + return [ + 'left' => ['align' => 'left', 'expected' => Alignment::LEFT], + 'center' => ['align' => 'center', 'expected' => Alignment::CENTER], + 'right' => ['align' => 'right', 'expected' => Alignment::RIGHT], + 'top' => ['align' => 'top', 'expected' => Alignment::TOP], + 'middle' => ['align' => 'middle', 'expected' => Alignment::CENTER], + 'bottom' => ['align' => 'bottom', 'expected' => Alignment::BOTTOM], + 'hoge' => ['align' => 'hoge', 'expected' => null], + ]; + } + + #[DataProvider('provide_parse_can_return_correct_alignment')] + public function test_parse_can_return_correct_alignment(string $align, Alignment|null $expected): void + { + $this->assertSame($expected, Align::parse($align)); + } +} diff --git a/tests/Enums/ImageDriverTest.php b/tests/Enums/ImageDriverTest.php new file mode 100644 index 0000000..df9947c --- /dev/null +++ b/tests/Enums/ImageDriverTest.php @@ -0,0 +1,57 @@ + 'gd', + 'Imagick' => 'imagick', + 'Vips' => 'vips', + ]; + + public function test_cases_can_return_cases_correctly(): void + { + $this->assertSame(array_keys($this->drivers), ImageDriver::names()); + } + + public function test_values_can_return_values_correctly(): void + { + $this->assertSame(array_values($this->drivers), ImageDriver::values()); + } + + public function test_asArray_can_return_array_correctly(): void + { + $this->assertSame($this->drivers, ImageDriver::asArray()); + } + + public function test_get_can_return_enum_correctly(): void + { + foreach ($this->drivers as $key => $value) { + $enum = ImageDriver::get($value); + $this->assertSame($key, $enum->name); + } + } + + public static function provide_classname_can_return_correct_classname(): array + { + return [ + 'gd' => ['driverName' => 'gd', 'expected' => 'Intervention\\Image\\Drivers\\Gd\\Driver'], + 'imagick' => ['driverName' => 'imagick', 'expected' => 'Intervention\\Image\\Drivers\\Imagick\\Driver'], + 'vips' => ['driverName' => 'vips', 'expected' => 'Intervention\\Image\\Drivers\\Vips\\Driver'], + 'hoge' => ['driverName' => 'hoge', 'expected' => null], + ]; + } + + #[DataProvider('provide_classname_can_return_correct_classname')] + public function test_classname_can_return_correct_classname(string $driverName, string|null $expected): void + { + $this->assertSame($expected, ImageDriver::tryFrom($driverName)?->classname()); + } +} diff --git a/tests/Helpers/ColorTest.php b/tests/Helpers/ColorTest.php new file mode 100644 index 0000000..f4c69cc --- /dev/null +++ b/tests/Helpers/ColorTest.php @@ -0,0 +1,34 @@ + ['color' => null, 'expected' => ImageColor::transparent()], + '#ff0000' => ['color' => '#ff0000', 'expected' => ImageColor::rgb(255, 0, 0)], + 'rgb(255, 0, 0)' => ['color' => 'rgb(255, 0, 0)', 'expected' => ImageColor::rgb(255, 0, 0)], + 'rgba(255, 0, 0, 1)' => ['color' => 'rgba(255, 0, 0, 1)', 'expected' => ImageColor::rgb(255, 0, 0, 1)], + ]; + } + + #[DataProvider('provide_parse_can_return_correct_color')] + public function test_parse_can_return_correct_color(string|null $color, ColorInterface $expected): void + { + $result = Color::parse($color); + $this->assertSame($expected->red()->value(), $result->red()->value()); + $this->assertSame($expected->green()->value(), $result->green()->value()); + $this->assertSame($expected->blue()->value(), $result->blue()->value()); + $this->assertSame($expected->alpha()->value(), $result->alpha()->value()); + } +} diff --git a/tests/Helpers/ConfigTest.php b/tests/Helpers/ConfigTest.php index bd11ff3..78772f5 100644 --- a/tests/Helpers/ConfigTest.php +++ b/tests/Helpers/ConfigTest.php @@ -2,16 +2,13 @@ declare(strict_types=1); -namespace Macocci7\PhpScatterplot\Helpers; +namespace Macocci7\PhpScatterplot\Tests\Helpers; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Macocci7\PhpScatterplot\Helpers\Config; use Nette\Neon\Neon; -/** - * @SuppressWarnings(PHPMD.CamelCaseMethodName) - */ final class ConfigTest extends TestCase { // phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps diff --git a/tests/Traits/JudgeTraitTest.php b/tests/Traits/JudgeTraitTest.php index db12337..17f04bf 100644 --- a/tests/Traits/JudgeTraitTest.php +++ b/tests/Traits/JudgeTraitTest.php @@ -2,17 +2,13 @@ declare(strict_types=1); -namespace Macocci7\PhpScatterplot\Traits; +namespace Macocci7\PhpScatterplot\Tests\Traits; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Macocci7\PhpScatterplot\Traits\JudgeTrait; use Nette\Neon\Neon; -/** - * @SuppressWarnings(PHPMD.TooManyPublicMethods) - * @SuppressWarnings(PHPMD.CamelCaseMethodName) - */ final class JudgeTraitTest extends TestCase { use JudgeTrait;

Properties - count: 32 - x: - - Mean: 19.809375 - - Max: 25.4 - - Min: 13.9 - - Variance: 6.748974609375 - - StandardDeviation: 2.5978788673406 + - Mean: 11.059375 + - Max: 16.9 + - Min: 4.8 + - Variance: 8.230537109375 + - StandardDeviation: 2.8688912683082 - y: - - Mean: 15.596875 - - Max: 19.7 - - Min: 10.1 - - Variance: 6.726552734375 - - StandardDeviation: 2.5935598574884 -- Covariance: 5.047841796875 -- CorrelationCoefficient: 0.74918756880131 + - Mean: 7.365625 + - Max: 14.9 + - Min: 1.5 + - Variance: 9.417880859375 + - StandardDeviation: 3.0688566045638 +- Covariance: 8.038291015625 +- CorrelationCoefficient: 0.9130047572481 - RegressionLineFormula: - - a: 0.74794203401848 - - b: 0.7806107698652 + - a: 0.97664233923069 + - b: -3.4354288704294

Properties - count: 32 - x: - - Mean: 19.809375 - - Max: 25.4 - - Min: 13.9 - - Variance: 6.748974609375 - - StandardDeviation: 2.5978788673406 + - Mean: 11.059375 + - Max: 16.9 + - Min: 4.8 + - Variance: 8.230537109375 + - StandardDeviation: 2.8688912683082 - y: - - Mean: 5.653125 - - Max: 13.3 + - Mean: 5.3 + - Max: 11.3 - Min: 0 - - Variance: 21.256240234375 - - StandardDeviation: 4.6104490274132 -- Covariance: 3.206064453125 -- CorrelationCoefficient: 0.26767642720506 + - Variance: 17.759375 + - StandardDeviation: 4.2141873475203 +- Covariance: -1.6240625 +- CorrelationCoefficient: -0.13433055557756 - RegressionLineFormula: - - a: 0.47504467547877 - - b: -3.7572131183122 + - a: -0.19732156946964 + - b: 7.4822532323533

Properties - count: 32 - x: - - Mean: 19.809375 - - Max: 25.4 - - Min: 13.9 - - Variance: 6.748974609375 - - StandardDeviation: 2.5978788673406 + - Mean: 11.059375 + - Max: 16.9 + - Min: 4.8 + - Variance: 8.230537109375 + - StandardDeviation: 2.8688912683082 - y: - - Mean: 11.828125 - - Max: 168.5 + - Mean: 4.5625 + - Max: 31 - Min: 0 - - Variance: 1067.1970214844 - - StandardDeviation: 32.667981594895 -- Covariance: 3.190673828125 -- CorrelationCoefficient: 0.037595962749643 + - Variance: 74.76171875 + - StandardDeviation: 8.6464859191466 +- Covariance: -0.4630859375 +- CorrelationCoefficient: -0.018668433012608 - RegressionLineFormula: - - a: 0.47276423646532 - - b: 2.4629609532698 + - a: -0.056264364202006 + - b: 5.1847487028466

Properties - count: 32 - x: - - Mean: 19.809375 - - Max: 25.4 - - Min: 13.9 - - Variance: 6.748974609375 - - StandardDeviation: 2.5978788673406 + - Mean: 11.059375 + - Max: 16.9 + - Min: 4.8 + - Variance: 8.230537109375 + - StandardDeviation: 2.8688912683082 - y: - - Mean: 1009.31875 - - Max: 1021.3 - - Min: 997 - - Variance: 36.3283984375 - - StandardDeviation: 6.0273044088962 -- Covariance: -3.43767578125 -- CorrelationCoefficient: -0.21954466663638 + - Mean: 1014.55625 + - Max: 1020.8 + - Min: 1004.6 + - Variance: 17.8293359375 + - StandardDeviation: 4.2224798326931 +- Covariance: -5.87771484375 +- CorrelationCoefficient: -0.48520675658624 - RegressionLineFormula: - - a: -0.50936267806886 - - b: 1019.4089063009 + - a: -0.71413502735502 + - b: 1022.4541370682
Maximum Temperature(℃)
Properties - count: 32 - x: - - Mean: 24.7375 - - Max: 32.2 - - Min: 17.2 - - Variance: 13.52796875 - - StandardDeviation: 3.678038709693 + - Mean: 15.70625 + - Max: 21.8 + - Min: 8.2 + - Variance: 10.3274609375 + - StandardDeviation: 3.213636715234 - y: - - Mean: 5.653125 - - Max: 13.3 + - Mean: 5.3 + - Max: 11.3 - Min: 0 - - Variance: 21.256240234375 - - StandardDeviation: 4.6104490274132 -- Covariance: 10.1048828125 -- CorrelationCoefficient: 0.59589777078761 + - Variance: 17.759375 + - StandardDeviation: 4.2141873475203 +- Covariance: 3.261875 +- CorrelationCoefficient: 0.2408555703511 - RegressionLineFormula: - - a: 0.74696231187701 - - b: -12.824855190058 + - a: 0.31584481604339 + - b: 0.33926235801848

Properties - count: 32 - x: - - Mean: 24.7375 - - Max: 32.2 - - Min: 17.2 - - Variance: 13.52796875 - - StandardDeviation: 3.678038709693 + - Mean: 15.70625 + - Max: 21.8 + - Min: 8.2 + - Variance: 10.3274609375 + - StandardDeviation: 3.213636715234 - y: - - Mean: 11.828125 - - Max: 168.5 + - Mean: 4.5625 + - Max: 31 - Min: 0 - - Variance: 1067.1970214844 - - StandardDeviation: 32.667981594895 -- Covariance: -18.7919921875 -- CorrelationCoefficient: -0.15639909125761 + - Variance: 74.76171875 + - StandardDeviation: 8.6464859191466 +- Covariance: -4.358203125 +- CorrelationCoefficient: -0.15684513368402 - RegressionLineFormula: - - a: -1.3891214959748 - - b: 46.191518006676 + - a: -0.4220014146144 + - b: 11.190559718287

Properties - count: 32 - x: - - Mean: 24.7375 - - Max: 32.2 - - Min: 17.2 - - Variance: 13.52796875 - - StandardDeviation: 3.678038709693 + - Mean: 15.70625 + - Max: 21.8 + - Min: 8.2 + - Variance: 10.3274609375 + - StandardDeviation: 3.213636715234 - y: - - Mean: 1009.31875 - - Max: 1021.3 - - Min: 997 - - Variance: 36.3283984375 - - StandardDeviation: 6.0273044088962 -- Covariance: -1.944453125 -- CorrelationCoefficient: -0.08771180661176 + - Mean: 1014.55625 + - Max: 1020.8 + - Min: 1004.6 + - Variance: 17.8293359375 + - StandardDeviation: 4.2224798326931 +- Covariance: -5.1691015625 +- CorrelationCoefficient: -0.38093484534136 - RegressionLineFormula: - - a: -0.14373577888402 - - b: 1012.8744138301 + - a: -0.50052007882504 + - b: 1022.417543488
Minimum Temperature(℃)
Properties - count: 32 - x: - - Mean: 15.596875 - - Max: 19.7 - - Min: 10.1 - - Variance: 6.726552734375 - - StandardDeviation: 2.5935598574884 + - Mean: 7.365625 + - Max: 14.9 + - Min: 1.5 + - Variance: 9.417880859375 + - StandardDeviation: 3.0688566045638 - y: - - Mean: 11.828125 - - Max: 168.5 + - Mean: 4.5625 + - Max: 31 - Min: 0 - - Variance: 1067.1970214844 - - StandardDeviation: 32.667981594895 -- Covariance: 28.621337890625 -- CorrelationCoefficient: 0.33780910649999 + - Variance: 74.76171875 + - StandardDeviation: 8.6464859191466 +- Covariance: 4.3943359375 +- CorrelationCoefficient: 0.16560636326303 - RegressionLineFormula: - - a: 4.2549785931745 - - b: -54.536244245418 + - a: 0.46659498066656 + - b: 1.1257363455279

Properties - count: 32 - x: - - Mean: 15.596875 - - Max: 19.7 - - Min: 10.1 - - Variance: 6.726552734375 - - StandardDeviation: 2.5935598574884 + - Mean: 7.365625 + - Max: 14.9 + - Min: 1.5 + - Variance: 9.417880859375 + - StandardDeviation: 3.0688566045638 - y: - - Mean: 1009.31875 - - Max: 1021.3 - - Min: 997 - - Variance: 36.3283984375 - - StandardDeviation: 6.0273044088962 -- Covariance: -6.01619140625 -- CorrelationCoefficient: -0.38485952832303 + - Mean: 1014.55625 + - Max: 1020.8 + - Min: 1004.6 + - Variance: 17.8293359375 + - StandardDeviation: 4.2224798326931 +- Covariance: -7.09744140625 +- CorrelationCoefficient: -0.54771878463843 - RegressionLineFormula: - - a: -0.89439444598497 - - b: 1023.2685083747 + - a: -0.75361342028285 + - b: 1020.1070838488
Sunshine Hours(h)
Properties - count: 32 - x: - - Mean: 5.653125 - - Max: 13.3 + - Mean: 5.3 + - Max: 11.3 - Min: 0 - - Variance: 21.256240234375 - - StandardDeviation: 4.6104490274132 + - Variance: 17.759375 + - StandardDeviation: 4.2141873475203 - y: - - Mean: 1009.31875 - - Max: 1021.3 - - Min: 997 - - Variance: 36.3283984375 - - StandardDeviation: 6.0273044088962 -- Covariance: 8.34587890625 -- CorrelationCoefficient: 0.30033484911277 + - Mean: 1014.55625 + - Max: 1020.8 + - Min: 1004.6 + - Variance: 17.8293359375 + - StandardDeviation: 4.2224798326931 +- Covariance: 6.49125 +- CorrelationCoefficient: 0.36479335000157 - RegressionLineFormula: - - a: 0.39263194310127 - - b: 1007.0991525467 + - a: 0.36551117367588 + - b: 1012.6190407795
Precipitation Amount(mm)
Mean Local Air Pressure(hPa)