Download the PHP package macocci7/php-boxplot without Composer

On this page you can find all versions of the php package macocci7/php-boxplot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-boxplot

PHP-Boxplot

1. Features

PHP-Boxplot is a PHP Library which is easy to use for creating boxplots.

Outlier Detection can be turned on/off.

Plotting Mean, Plotting Jitter and Plotting Outliers are available.

  Multiple datasets can be displayed side by side at the same time. Legends can also be displayed. Transparent background is also supported. ## Contents - [1. Features](#1-features) - 2\. Contents - [3. Requirements](#3-requirements) - [4. Installation](#4-installation) - [5. Usage](#5-usage) - [5.1. Basic Usage](#51-basic-usage) - [5.2. Adjusting the Display By Methods](#52-adjusting-the-display-by-methods) - [5.3. Multiple Data Set](#53-multiple-data-set) - [5.4. Adjusting the Display By Neon File](#54-adjusting-the-display-by-neon-file) - [5.5. Adjusting the Display By Array](#55-adjusting-the-display-by-array) - [5.6. Transparent Background](#56-transparent-background) - [6. Examples](#6-examples) - [7. LICENSE](#7-license) ## 3. Requirements - PHP 8.1 or later - Imagick PHP Extension Check with commands: - Composer ## 4. Installation ## 5. Usage - [5.1. Basic Usage](#51-basic-usage) - [5.2. Adjusting the Display By Methods](#52-adjusting-the-display-by-methods) - [5.3. Multiple Data Set](#53-multiple-data-set) - [5.4. Adjusting the Display By Neon File](#54-adjusting-the-display-by-neon-file) - [5.5. Adjusting the Display By Array](#55-adjusting-the-display-by-array) - [5.6. Transparent Background](#56-transparent-background) ### 5.1. Basic Usage - PHP: [examples/BasicUsage.php](examples/BasicUsage.php) - Result: - `Outlier Detection` is enabled by default. - `Outliers` are plotted as red dods. - The `Scale Range` is 10% larger than the `Data Range`. - Horizontal grid lines are drawn at intervals of 10% of the `Scale Range`. - The hash keys of the data are used as the labels for the X axis. - Details: - Import Autoloader: `require_once __DIR__ . '/../vendor/autoload.php'` - Declare: `use Macocci7\PhpBoxplot\Boxplot` - Instantiate: `new Boxplot()` - Set Data: `setData($data)` - Acceptable Data Type: `array>` - Create Image: `create($path)` ### 5.2. Adjusting the Display By Methods Adjusting Scale Size, Grid Pitch, Showing Vertical Grids, Setting Labels for Each Boxplot, Labels for X Axis, Labels For Y Axis And Setting Caption can be done as follows: - PHP: - Result: - Details: - Set Limits: `limit(int|float $lower, int|float $upper)` - Set Grid Pitch: `gridHeightPitch(int|float $pitch)` - Set Vertical Grid Visibility: - `gridVerticalOn()` - `gridVerticalOff()` - Set Labels: `labels(string[] $labels)` - Set Label for X Axis: `labelX(string $labelX)` - Set Label for Y Axis: `labelY(string $labelY)` - Set Caption: `caption(string $caption)` - Available Methods: Note: `$colorCode` must be in `#RGB` or `#RRGGBB` format. | Method | Detail | | :--- | :--- | |resize(int $width, int $height)|Resizes Canvas Size| |bgcolor(string $colorCode)|Sets Canvas Background Color| |fontColor(string $colorCode)|Sets Font Color| |axisColor(string $colorCode)|Sets Axis Color| |gridColor(string $colorCode)|Sets Grid Color| |boxBorder(int $width, string $colorCode)|Sets Box Border Color| |whisker(int $width, string $colorCode)|Sets Whisker Width and Color| |gridHeightPitch(int\|float $pitch)|Sets Grid Pitch| |boxWidth(int $width)|Sets Box Width| |boxBackground(array $colorCodes)|Sets Box Background Color Set| |labels(array $labels)|Sets Labels for Each Box| |labelX(string $label)|Sets Label for X Axis| |labelY(string $label)|Sets Label for Y Axis| |caption(string $caption)|Sets Caption| |legends(array $legends)|Sets Legend Labels| |legendBgcolor(string $colorCode)|Sets Legends Area Background Color| |gridVerticalOn()|Sets Visibility of Vertical Grid On| |gridVerticalOff()|Sets Visibility of Vertical Grid Off| |outlierOn()|Sets Outlier Detection On| |outlierOff()|Sets Outlier Detection Off| |jitterOn()|Sets Jitter Plot On| |jitterOff()|Sets Jitter Plot Off| |meanOn()|Sets Plotting Mean On| |meanOff()|Sets Plotting Mean Off| |legendOn()|Sets Displaying Legends On| |legendOff()|Sets Displaying Legends Off| ### 5.3. Multiple Data Set Multiple datasets can be displayed side by side at the same time. - PHP: [examples/MultipleDataSet.php](examples/MultipleDataSet.php) - Result: [examples/img/MultipleDataSet.png](examples/img/MultipleDataSet.png) - Details: - Set Data Set: `setDataset(array $dataSet)` - `$dataSet`: `array>>` - The result of `array_keys($dataSet)` will be set as the legends. - In this case: [ 'John', 'Jake', 'Hugo', ] will be set as the legends. - The result of `array_keys($dataSet[array_keys($dataSet)[0]])` will be set as the labels. - In this case: [ '1st', '2nd', '3rd', '4th', '5th', ] will be set as the legends. - `legends(array $legends)` can overwrite legends. - `labels(array $labels)` can overwrite labels. ### 5.4. Adjusting the Display By Neon File You can adjust the display by using Neon file. First, prepare a Neon file like this: - Neon: [examples/AdjustDisplayByNeon.neon](examples/AdjustDisplayByNeon.neon) Second, Code PHP like this: - PHP: [examples/AdjustDisplayByNeon.php](examples/AdjustDisplayByNeon.php) Then, run the PHP Code. - Result: [examples/img/AdjustDisplayByNeon.png](examples/img/AdjustDisplayByNeon.png) ### 5.5. Adjusting the Display By Array You can Adjust the Display by using Array. - PHP: [examples/AdjustDisplayByArray.php](examples/AdjustDisplayByArray.php) - Result: [examples/img/AdjustDisplayByArray.png](examples/img/AdjustDisplayByArray.png) ### 5.6. Transparent Background You can set transparent background like this. - PHP: [examples/TransparentBackground.php](examples/TransparentBackground.php) - Result: [examples/img/TransparentBackground.png](examples/img/TransparentBackground.png) ## Examples - [BasicUsage.php](examples/BasicUsage.php) >> results in: - [AdjustDisplayByMethods.php](examples/AdjustDisplayByMethods.php) >> results in: - [AdjustDisplayByNeon.php](examples/AdjustDisplayByNeon.php) >> results in: - [AdjustDisplayByArray.php](examples/AdjustDisplayByArray.php) >> results in: - [MultipleDataSet.php](examples/MultipleDataSet.php) >> results in: - [TransparentBackground.php](examples/TransparentBackground.php) >> results in: - [DetmersReidBoxplot2023.php](examples/DetmersReidBoxplot2023.php) >> results in:
- [BoxplotExampleCase.php](examples/BoxplotExampleCase.php) >> results in: ## License [MIT](LICENSE) *** *Document created: 2023/05/28* *Document updated: 2025/01/02* Copyright 2023 - 2025 macocci7

All versions of php-boxplot with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
macocci7/php-frequency-table Version ^1.4
fakerphp/faker Version ^1.24
nette/neon Version ^3.4
macocci7/php-plotter2d Version ^0.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package macocci7/php-boxplot contains the following files

Loading the files please wait ....