ggpubpy


Nameggpubpy JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
Summarymatplotlib Based Publication-Ready Plots
upload_time2025-08-17 02:12:11
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2025 Izzet Turkalp Akbasli Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords matplotlib plotting visualization statistics publication ggplot data-science
VCS
bugtrack_url
requirements numpy pandas matplotlib scipy
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI version](https://img.shields.io/pypi/v/ggpubpy)](https://pypi.org/project/ggpubpy)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ggpubpy)](https://pypi.org/project/ggpubpy)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/turkalpmd/ggpubpy/blob/main/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/turkalpmd/ggpubpy?style=social)](https://github.com/turkalpmd/ggpubpy)
[![GitHub forks](https://img.shields.io/github/forks/turkalpmd/ggpubpy?style=social)](https://github.com/turkalpmd/ggpubpy)

# ggpubpy: 'matplotlib' Based Publication-Ready Plots

Matplotlib is an excellent and flexible package for elegant data visualization in Python. However, the default plotting routines often require extensive boilerplate and manual styling before figures are ready for publication. Customizing complex plots can be a barrier for researchers and analysts without advanced plotting expertise.

The **ggpubpy** library provides a suite of easy-to-use functions for creating and customizing Matplotlib-based, publication-ready plotsβ€”complete with built-in statistical tests and automatic p-value or significance star annotations. This project is directly inspired by R's [ggpubr](https://github.com/kassambara/ggpubr) package.

**πŸ“¦ PyPI Package**: https://pypi.org/project/ggpubpy/  
**πŸ™ GitHub Repository**: https://github.com/turkalpmd/ggpubpy  


---

## Installation and loading

Install the latest stable release from PyPI (recommended):

```bash
pip install ggpubpy
```

**Why install from PyPI?**
- βœ… Stable, tested releases
- βœ… Automatic dependency management
- βœ… Easy updates with `pip install --upgrade ggpubpy`
- βœ… Compatible with virtual environments

Or install the development version directly from GitHub:

```bash
pip install git+https://github.com/turkalpmd/ggpubpy.git
```

Load the package:

```python
import ggpubpy
from ggpubpy import violinggplot, boxggplot, plot_shift, plot_correlation_matrix
from ggpubpy.datasets import load_iris  # Built-in datasets
```

---

## Core Features

- **Violin + boxplot + jitter** in one call  
- **Correlation matrix plots** with scatter plots, histograms, and statistical annotations
- **Shift plots** for advanced distribution comparison with quantile analysis
- **Automatic color palettes** with ColorBrewer-inspired defaults
- **Built-in datasets** (iris) for quick testing and examples
- **Flexible group comparisons** - works with 2-group, 3-group, or more
- **Built-in Kruskal–Wallis & Mann–Whitney U tests** (or ANOVA & t-tests for parametric option)  
- **Automatic p-value or "star" annotation** with dynamic bracket placement
- **Smart p-value formatting** - pairwise comparisons show significance stars (*, **, ns), global tests show formatted values (<0.001)  
- **Parametric and non-parametric statistical tests** with `parametric=True/False` option
- **Smart test selection** - t-test for 2 groups, ANOVA for 3+ groups (parametric mode)
- **Modular, data-driven API**: custom labels, ordering, figure sizing

---

## Quick Examples

### 🎻 Violin plots with boxplots & jitter + statistical tests

#### 3-Group Comparison (All Species)
```python
import ggpubpy
from ggpubpy.datasets import load_iris

# Load the iris dataset
iris = load_iris()

# Create the plot with default colors (automatic palette)
fig, ax = ggpubpy.violinggplot(
    df=iris, 
    x="species", 
    y="sepal_length",
    x_label="Species", 
    y_label="Sepal Length (cm)"
)
```

![Violin Plot Example](examples/violin_example.png)

#### 2-Group Comparison (Subset Analysis)
```python
# Filter for 2-group comparison
iris_2groups = iris[iris['species'].isin(['setosa', 'versicolor'])]

# Create 2-group comparison plot
fig, ax = ggpubpy.violinggplot(
    df=iris_2groups, 
    x="species", 
    y="sepal_length",
    x_label="Species", 
    y_label="Sepal Length (cm)"
)
```

![Violin Plot 2-Groups](examples/violin_2groups_example.png)

### πŸ“Š Boxplots with jitter + statistical tests

#### 3-Group Box Plot with Default Colors
```python
# Create boxplot with default automatic colors
fig, ax = ggpubpy.boxggplot(
    df=iris, 
    x="species", 
    y="sepal_length",
    x_label="Species", 
    y_label="Sepal Length (cm)"
)
```

![Box Plot Example](examples/boxplot_example.png)

#### 2-Group Box Plot with Statistical Tests
```python
# 2-group comparison with Mann-Whitney U test (non-parametric default)
iris_2groups = iris[iris['species'].isin(['setosa', 'versicolor'])]

fig, ax = ggpubpy.boxggplot(
    df=iris_2groups, 
    x="species", 
    y="sepal_length",
    x_label="Species", 
    y_label="Sepal Length (cm)",
    parametric=False  # Non-parametric tests (default)
)
```

![Box Plot 2-Groups](examples/boxplot_2groups_example.png)

### πŸ“ˆ Shift plots for distribution comparison

Shift plots provide a powerful visualization for comparing two distributions by showing:
- **Half-violin plots** showing distribution shapes
- **Box plots** with quartiles and outliers  
- **Raw data points** for transparency
- **Quantile connections** (optional) showing how percentiles shift between groups
- **Statistical test results** in the title
- **Quantile difference subplot** (optional) for detailed quantile analysis

#### Basic Shift Plot
```python
# Compare two groups with shift plot
iris_2groups = iris[iris['species'].isin(['setosa', 'versicolor'])]
x = iris_2groups[iris_2groups['species'] == 'setosa']['sepal_length'].values
y = iris_2groups[iris_2groups['species'] == 'versicolor']['sepal_length'].values

fig = ggpubpy.plot_shift(
    x, y, 
    paired=False, 
    n_boot=1000,
    percentiles=[10, 50, 90], 
    confidence=0.95,
    show_quantiles=True,  # Show quantile connection lines
    show_quantile_diff=False,  # Hide quantile difference subplot
    x_name="Setosa", 
    y_name="Versicolor"
)
```

![Shift Plot Example](examples/shift_plot_example.png)

#### Shift Plot with Quantile Differences
```python
# Same plot but with quantile difference subplot
fig = ggpubpy.plot_shift(
    x, y,
    paired=False,
    show_quantiles=True,
    show_quantile_diff=True,  # Show quantile difference subplot
    x_name="Setosa",
    y_name="Versicolor"
)
```

![Shift Plot with Differences](examples/shift_plot_with_diff_example.png)

### πŸ”— Correlation Matrix Plots

Correlation matrix plots provide a comprehensive view of relationships between multiple variables by combining:
- **Diagonal elements**: Histograms with KDE overlays showing the distribution of each variable
- **Lower triangle**: Scatter plots with trend lines showing pairwise relationships
- **Upper triangle**: Correlation coefficients with significance stars for statistical assessment

This visualization is particularly powerful for:
- **Exploratory data analysis** - quickly identify patterns and relationships
- **Multicollinearity detection** - spot highly correlated variables
- **Variable selection** - understand which variables are most informative
- **Publication-ready figures** - professional appearance with proper statistical annotations

#### Basic Correlation Matrix
```python
# Create correlation matrix for iris dataset
fig, axes = ggpubpy.plot_correlation_matrix(
    iris,
    columns=['sepal_length', 'sepal_width', 'petal_length', 'petal_width'],
    figsize=(8, 8),
    color="#27AE60",
    alpha=0.6,
    point_size=20,
    show_stats=True,
    method="pearson",
    title="Iris Dataset - Correlation Matrix"
)
```

![Correlation Matrix Example](examples/correlation_matrix_example.png)

#### Interpreting the Correlation Matrix:
- **Diagonal histograms**: Show the distribution shape of each variable (normal, skewed, bimodal, etc.)
- **Scatter plots (lower triangle)**: Reveal the nature of relationships (linear, non-linear, strength)
- **Correlation values (upper triangle)**: Quantify relationship strength with significance testing
- **Color coding**: Strong correlations (|r| β‰₯ 0.7) in dark red/blue, moderate (|r| β‰₯ 0.3) in red/blue
- **Significance stars**: *** (p < 0.001), ** (p < 0.01), * (p < 0.05), no stars (non-significant)

#### Advanced Options
```python
# Different correlation methods and customization
fig, axes = ggpubpy.plot_correlation_matrix(
    df,
    columns=['var1', 'var2', 'var3'],  # Specify variables
    method="spearman",  # or "kendall" for non-parametric
    color="#E74C3C",
    alpha=0.7,
    point_size=25,
    show_stats=False,  # Hide significance stars
    title="Custom Correlation Analysis"
)
```

### 🎨 Advanced Features

```python
# Custom color palette
custom_palette = {
    "setosa": "#FF6B6B", 
    "versicolor": "#4ECDC4", 
    "virginica": "#45B7D1"
}

fig, ax = ggpubpy.violinggplot(
    df=iris, 
    x="species", 
    y="petal_length",
    x_label="Species", 
    y_label="Petal Length (cm)",
    palette=custom_palette
)

# Parametric tests (ANOVA + t-test instead of Kruskal-Wallis + Mann-Whitney)
fig, ax = ggpubpy.violinggplot(
    df=iris, 
    x="species", 
    y="sepal_length",
    x_label="Species", 
    y_label="Sepal Length (cm)",
    parametric=True
)

# Custom ordering
fig, ax = ggpubpy.violinggplot(
    df=iris, 
    x="species",
    y="petal_width",
    order=["virginica", "versicolor", "setosa"]  # Custom order
)
```

### πŸ“Š Built-in Datasets

```python
# Load built-in datasets
iris = ggpubpy.datasets.load_iris()
print(f"Available datasets: {ggpubpy.datasets.list_datasets()}")

# Get recommended color palette for iris species
palette = ggpubpy.datasets.get_iris_palette()
print(palette)  # {'setosa': '#00AFBB', 'versicolor': '#E7B800', 'virginica': '#FC4E07'}
```

---

## 🀝 Contributing

**We welcome contributions!** This project is designed to be contribution-friendly.

### Ways to Contribute:
- πŸ› **Bug reports** and feature requests
- πŸ“– **Documentation** improvements  
- πŸ”§ **Code contributions** (new features, optimizations, tests)
- 🎨 **New plot types** and statistical tests
- πŸ“Š **Additional datasets** and examples

### Getting Started:
```bash
# Clone and setup development environment
git clone https://github.com/turkalpmd/ggpubpy.git
cd ggpubpy
pip install -e .
pip install -r requirements-dev.txt

# Run tests to verify setup
python final_check.py
```

### Getting Help & Support
- πŸ› **GitHub Issues**: For bug reports and feature requests.
- πŸ’¬ **GitHub Discussions**: For questions, suggestions, and community discussion.
- πŸ“š **API Reference**: Complete function documentation is available in the source code docstrings.

---

## πŸ“š Citation

If you use **ggpubpy** in your work, please cite it as:

Akbasli, I. T. (2025). *Python Based Publication-Ready Plots*. Zenodo. https://doi.org/10.5281/zenodo.15707309

Or in BibTeX:

```bibtex
@software{akbasli2025ggpubpy,
  author       = {Izzet Turkalp Akbasli},
  title        = {Python Based Publication-Ready Plots},
  year         = {2025},
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.15707309},
  url          = {https://doi.org/10.5281/zenodo.15707309}
}
```

---

## License

**ggpubpy** is released under the MIT License. See [LICENSE](https://github.com/turkalpmd/ggpubpy/blob/main/LICENSE) for details.

---

## πŸ“ˆ Project Status

πŸŽ‰ **PUBLISHED ON PyPI**: June 20, 2025  
πŸ“¦ **Latest Version**: 0.3.0  
🌟 **Status**: Stable and ready for production use  
🀝 **Contributing**: Open for community contributions  

**Install now**: `pip install ggpubpy`

## Changelog

### Version 0.3.0 (August 16, 2025)
**πŸ†• Major Feature Addition: Correlation Matrix Plots**

- ✨ **New function**: `plot_correlation_matrix()` - Create comprehensive correlation matrix visualizations
- πŸ“Š **Diagonal plots**: Histograms with KDE overlay for univariate distributions
- πŸ”— **Lower triangle**: Scatter plots with trend lines and confidence intervals
- πŸ“ˆ **Upper triangle**: Correlation coefficients with statistical significance indicators
- 🎯 **Multiple methods**: Support for Pearson, Spearman, and Kendall correlations
- 🎨 **Customizable**: Full control over colors, sizes, transparency, and statistical display
- πŸ“š **Documentation**: Comprehensive examples and usage guide added
- πŸ§ͺ **Tests**: Complete test coverage for all new functionality

**Improvements:**
- Enhanced error handling and input validation
- Better integration with existing plotting functions
- Updated examples and documentation
- Improved code organization and type hints

### Version 0.2.1 (June 20, 2025)
- Stability improvements and bug fixes
- Enhanced documentation

### Version 0.2.0 (June 20, 2025)
- Initial stable release with core plotting functions

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ggpubpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Turkalp Akbasli <akbaslint@gmail.com>",
    "keywords": "matplotlib, plotting, visualization, statistics, publication, ggplot, data-science",
    "author": null,
    "author_email": "Turkalp Akbasli <akbaslint@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/10/10/7710dcdc9482f4e618df22cdb1d1168e74ff96a3f9d3eec487e0d004ebb8/ggpubpy-0.3.0.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://img.shields.io/pypi/v/ggpubpy)](https://pypi.org/project/ggpubpy)\r\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ggpubpy)](https://pypi.org/project/ggpubpy)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/turkalpmd/ggpubpy/blob/main/LICENSE)\r\n[![GitHub stars](https://img.shields.io/github/stars/turkalpmd/ggpubpy?style=social)](https://github.com/turkalpmd/ggpubpy)\r\n[![GitHub forks](https://img.shields.io/github/forks/turkalpmd/ggpubpy?style=social)](https://github.com/turkalpmd/ggpubpy)\r\n\r\n# ggpubpy: 'matplotlib' Based Publication-Ready Plots\r\n\r\nMatplotlib is an excellent and flexible package for elegant data visualization in Python. However, the default plotting routines often require extensive boilerplate and manual styling before figures are ready for publication. Customizing complex plots can be a barrier for researchers and analysts without advanced plotting expertise.\r\n\r\nThe **ggpubpy** library provides a suite of easy-to-use functions for creating and customizing Matplotlib-based, publication-ready plots\u2014complete with built-in statistical tests and automatic p-value or significance star annotations. This project is directly inspired by R's [ggpubr](https://github.com/kassambara/ggpubr) package.\r\n\r\n**\ud83d\udce6 PyPI Package**: https://pypi.org/project/ggpubpy/  \r\n**\ud83d\udc19 GitHub Repository**: https://github.com/turkalpmd/ggpubpy  \r\n\r\n\r\n---\r\n\r\n## Installation and loading\r\n\r\nInstall the latest stable release from PyPI (recommended):\r\n\r\n```bash\r\npip install ggpubpy\r\n```\r\n\r\n**Why install from PyPI?**\r\n- \u2705 Stable, tested releases\r\n- \u2705 Automatic dependency management\r\n- \u2705 Easy updates with `pip install --upgrade ggpubpy`\r\n- \u2705 Compatible with virtual environments\r\n\r\nOr install the development version directly from GitHub:\r\n\r\n```bash\r\npip install git+https://github.com/turkalpmd/ggpubpy.git\r\n```\r\n\r\nLoad the package:\r\n\r\n```python\r\nimport ggpubpy\r\nfrom ggpubpy import violinggplot, boxggplot, plot_shift, plot_correlation_matrix\r\nfrom ggpubpy.datasets import load_iris  # Built-in datasets\r\n```\r\n\r\n---\r\n\r\n## Core Features\r\n\r\n- **Violin + boxplot + jitter** in one call  \r\n- **Correlation matrix plots** with scatter plots, histograms, and statistical annotations\r\n- **Shift plots** for advanced distribution comparison with quantile analysis\r\n- **Automatic color palettes** with ColorBrewer-inspired defaults\r\n- **Built-in datasets** (iris) for quick testing and examples\r\n- **Flexible group comparisons** - works with 2-group, 3-group, or more\r\n- **Built-in Kruskal\u2013Wallis & Mann\u2013Whitney U tests** (or ANOVA & t-tests for parametric option)  \r\n- **Automatic p-value or \"star\" annotation** with dynamic bracket placement\r\n- **Smart p-value formatting** - pairwise comparisons show significance stars (*, **, ns), global tests show formatted values (<0.001)  \r\n- **Parametric and non-parametric statistical tests** with `parametric=True/False` option\r\n- **Smart test selection** - t-test for 2 groups, ANOVA for 3+ groups (parametric mode)\r\n- **Modular, data-driven API**: custom labels, ordering, figure sizing\r\n\r\n---\r\n\r\n## Quick Examples\r\n\r\n### \ud83c\udfbb Violin plots with boxplots & jitter + statistical tests\r\n\r\n#### 3-Group Comparison (All Species)\r\n```python\r\nimport ggpubpy\r\nfrom ggpubpy.datasets import load_iris\r\n\r\n# Load the iris dataset\r\niris = load_iris()\r\n\r\n# Create the plot with default colors (automatic palette)\r\nfig, ax = ggpubpy.violinggplot(\r\n    df=iris, \r\n    x=\"species\", \r\n    y=\"sepal_length\",\r\n    x_label=\"Species\", \r\n    y_label=\"Sepal Length (cm)\"\r\n)\r\n```\r\n\r\n![Violin Plot Example](examples/violin_example.png)\r\n\r\n#### 2-Group Comparison (Subset Analysis)\r\n```python\r\n# Filter for 2-group comparison\r\niris_2groups = iris[iris['species'].isin(['setosa', 'versicolor'])]\r\n\r\n# Create 2-group comparison plot\r\nfig, ax = ggpubpy.violinggplot(\r\n    df=iris_2groups, \r\n    x=\"species\", \r\n    y=\"sepal_length\",\r\n    x_label=\"Species\", \r\n    y_label=\"Sepal Length (cm)\"\r\n)\r\n```\r\n\r\n![Violin Plot 2-Groups](examples/violin_2groups_example.png)\r\n\r\n### \ud83d\udcca Boxplots with jitter + statistical tests\r\n\r\n#### 3-Group Box Plot with Default Colors\r\n```python\r\n# Create boxplot with default automatic colors\r\nfig, ax = ggpubpy.boxggplot(\r\n    df=iris, \r\n    x=\"species\", \r\n    y=\"sepal_length\",\r\n    x_label=\"Species\", \r\n    y_label=\"Sepal Length (cm)\"\r\n)\r\n```\r\n\r\n![Box Plot Example](examples/boxplot_example.png)\r\n\r\n#### 2-Group Box Plot with Statistical Tests\r\n```python\r\n# 2-group comparison with Mann-Whitney U test (non-parametric default)\r\niris_2groups = iris[iris['species'].isin(['setosa', 'versicolor'])]\r\n\r\nfig, ax = ggpubpy.boxggplot(\r\n    df=iris_2groups, \r\n    x=\"species\", \r\n    y=\"sepal_length\",\r\n    x_label=\"Species\", \r\n    y_label=\"Sepal Length (cm)\",\r\n    parametric=False  # Non-parametric tests (default)\r\n)\r\n```\r\n\r\n![Box Plot 2-Groups](examples/boxplot_2groups_example.png)\r\n\r\n### \ud83d\udcc8 Shift plots for distribution comparison\r\n\r\nShift plots provide a powerful visualization for comparing two distributions by showing:\r\n- **Half-violin plots** showing distribution shapes\r\n- **Box plots** with quartiles and outliers  \r\n- **Raw data points** for transparency\r\n- **Quantile connections** (optional) showing how percentiles shift between groups\r\n- **Statistical test results** in the title\r\n- **Quantile difference subplot** (optional) for detailed quantile analysis\r\n\r\n#### Basic Shift Plot\r\n```python\r\n# Compare two groups with shift plot\r\niris_2groups = iris[iris['species'].isin(['setosa', 'versicolor'])]\r\nx = iris_2groups[iris_2groups['species'] == 'setosa']['sepal_length'].values\r\ny = iris_2groups[iris_2groups['species'] == 'versicolor']['sepal_length'].values\r\n\r\nfig = ggpubpy.plot_shift(\r\n    x, y, \r\n    paired=False, \r\n    n_boot=1000,\r\n    percentiles=[10, 50, 90], \r\n    confidence=0.95,\r\n    show_quantiles=True,  # Show quantile connection lines\r\n    show_quantile_diff=False,  # Hide quantile difference subplot\r\n    x_name=\"Setosa\", \r\n    y_name=\"Versicolor\"\r\n)\r\n```\r\n\r\n![Shift Plot Example](examples/shift_plot_example.png)\r\n\r\n#### Shift Plot with Quantile Differences\r\n```python\r\n# Same plot but with quantile difference subplot\r\nfig = ggpubpy.plot_shift(\r\n    x, y,\r\n    paired=False,\r\n    show_quantiles=True,\r\n    show_quantile_diff=True,  # Show quantile difference subplot\r\n    x_name=\"Setosa\",\r\n    y_name=\"Versicolor\"\r\n)\r\n```\r\n\r\n![Shift Plot with Differences](examples/shift_plot_with_diff_example.png)\r\n\r\n### \ud83d\udd17 Correlation Matrix Plots\r\n\r\nCorrelation matrix plots provide a comprehensive view of relationships between multiple variables by combining:\r\n- **Diagonal elements**: Histograms with KDE overlays showing the distribution of each variable\r\n- **Lower triangle**: Scatter plots with trend lines showing pairwise relationships\r\n- **Upper triangle**: Correlation coefficients with significance stars for statistical assessment\r\n\r\nThis visualization is particularly powerful for:\r\n- **Exploratory data analysis** - quickly identify patterns and relationships\r\n- **Multicollinearity detection** - spot highly correlated variables\r\n- **Variable selection** - understand which variables are most informative\r\n- **Publication-ready figures** - professional appearance with proper statistical annotations\r\n\r\n#### Basic Correlation Matrix\r\n```python\r\n# Create correlation matrix for iris dataset\r\nfig, axes = ggpubpy.plot_correlation_matrix(\r\n    iris,\r\n    columns=['sepal_length', 'sepal_width', 'petal_length', 'petal_width'],\r\n    figsize=(8, 8),\r\n    color=\"#27AE60\",\r\n    alpha=0.6,\r\n    point_size=20,\r\n    show_stats=True,\r\n    method=\"pearson\",\r\n    title=\"Iris Dataset - Correlation Matrix\"\r\n)\r\n```\r\n\r\n![Correlation Matrix Example](examples/correlation_matrix_example.png)\r\n\r\n#### Interpreting the Correlation Matrix:\r\n- **Diagonal histograms**: Show the distribution shape of each variable (normal, skewed, bimodal, etc.)\r\n- **Scatter plots (lower triangle)**: Reveal the nature of relationships (linear, non-linear, strength)\r\n- **Correlation values (upper triangle)**: Quantify relationship strength with significance testing\r\n- **Color coding**: Strong correlations (|r| \u2265 0.7) in dark red/blue, moderate (|r| \u2265 0.3) in red/blue\r\n- **Significance stars**: *** (p < 0.001), ** (p < 0.01), * (p < 0.05), no stars (non-significant)\r\n\r\n#### Advanced Options\r\n```python\r\n# Different correlation methods and customization\r\nfig, axes = ggpubpy.plot_correlation_matrix(\r\n    df,\r\n    columns=['var1', 'var2', 'var3'],  # Specify variables\r\n    method=\"spearman\",  # or \"kendall\" for non-parametric\r\n    color=\"#E74C3C\",\r\n    alpha=0.7,\r\n    point_size=25,\r\n    show_stats=False,  # Hide significance stars\r\n    title=\"Custom Correlation Analysis\"\r\n)\r\n```\r\n\r\n### \ud83c\udfa8 Advanced Features\r\n\r\n```python\r\n# Custom color palette\r\ncustom_palette = {\r\n    \"setosa\": \"#FF6B6B\", \r\n    \"versicolor\": \"#4ECDC4\", \r\n    \"virginica\": \"#45B7D1\"\r\n}\r\n\r\nfig, ax = ggpubpy.violinggplot(\r\n    df=iris, \r\n    x=\"species\", \r\n    y=\"petal_length\",\r\n    x_label=\"Species\", \r\n    y_label=\"Petal Length (cm)\",\r\n    palette=custom_palette\r\n)\r\n\r\n# Parametric tests (ANOVA + t-test instead of Kruskal-Wallis + Mann-Whitney)\r\nfig, ax = ggpubpy.violinggplot(\r\n    df=iris, \r\n    x=\"species\", \r\n    y=\"sepal_length\",\r\n    x_label=\"Species\", \r\n    y_label=\"Sepal Length (cm)\",\r\n    parametric=True\r\n)\r\n\r\n# Custom ordering\r\nfig, ax = ggpubpy.violinggplot(\r\n    df=iris, \r\n    x=\"species\",\r\n    y=\"petal_width\",\r\n    order=[\"virginica\", \"versicolor\", \"setosa\"]  # Custom order\r\n)\r\n```\r\n\r\n### \ud83d\udcca Built-in Datasets\r\n\r\n```python\r\n# Load built-in datasets\r\niris = ggpubpy.datasets.load_iris()\r\nprint(f\"Available datasets: {ggpubpy.datasets.list_datasets()}\")\r\n\r\n# Get recommended color palette for iris species\r\npalette = ggpubpy.datasets.get_iris_palette()\r\nprint(palette)  # {'setosa': '#00AFBB', 'versicolor': '#E7B800', 'virginica': '#FC4E07'}\r\n```\r\n\r\n---\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\n**We welcome contributions!** This project is designed to be contribution-friendly.\r\n\r\n### Ways to Contribute:\r\n- \ud83d\udc1b **Bug reports** and feature requests\r\n- \ud83d\udcd6 **Documentation** improvements  \r\n- \ud83d\udd27 **Code contributions** (new features, optimizations, tests)\r\n- \ud83c\udfa8 **New plot types** and statistical tests\r\n- \ud83d\udcca **Additional datasets** and examples\r\n\r\n### Getting Started:\r\n```bash\r\n# Clone and setup development environment\r\ngit clone https://github.com/turkalpmd/ggpubpy.git\r\ncd ggpubpy\r\npip install -e .\r\npip install -r requirements-dev.txt\r\n\r\n# Run tests to verify setup\r\npython final_check.py\r\n```\r\n\r\n### Getting Help & Support\r\n- \ud83d\udc1b **GitHub Issues**: For bug reports and feature requests.\r\n- \ud83d\udcac **GitHub Discussions**: For questions, suggestions, and community discussion.\r\n- \ud83d\udcda **API Reference**: Complete function documentation is available in the source code docstrings.\r\n\r\n---\r\n\r\n## \ud83d\udcda Citation\r\n\r\nIf you use **ggpubpy** in your work, please cite it as:\r\n\r\nAkbasli, I. T. (2025). *Python Based Publication-Ready Plots*. Zenodo. https://doi.org/10.5281/zenodo.15707309\r\n\r\nOr in BibTeX:\r\n\r\n```bibtex\r\n@software{akbasli2025ggpubpy,\r\n  author       = {Izzet Turkalp Akbasli},\r\n  title        = {Python Based Publication-Ready Plots},\r\n  year         = {2025},\r\n  publisher    = {Zenodo},\r\n  doi          = {10.5281/zenodo.15707309},\r\n  url          = {https://doi.org/10.5281/zenodo.15707309}\r\n}\r\n```\r\n\r\n---\r\n\r\n## License\r\n\r\n**ggpubpy** is released under the MIT License. See [LICENSE](https://github.com/turkalpmd/ggpubpy/blob/main/LICENSE) for details.\r\n\r\n---\r\n\r\n## \ud83d\udcc8 Project Status\r\n\r\n\ud83c\udf89 **PUBLISHED ON PyPI**: June 20, 2025  \r\n\ud83d\udce6 **Latest Version**: 0.3.0  \r\n\ud83c\udf1f **Status**: Stable and ready for production use  \r\n\ud83e\udd1d **Contributing**: Open for community contributions  \r\n\r\n**Install now**: `pip install ggpubpy`\r\n\r\n## Changelog\r\n\r\n### Version 0.3.0 (August 16, 2025)\r\n**\ud83c\udd95 Major Feature Addition: Correlation Matrix Plots**\r\n\r\n- \u2728 **New function**: `plot_correlation_matrix()` - Create comprehensive correlation matrix visualizations\r\n- \ud83d\udcca **Diagonal plots**: Histograms with KDE overlay for univariate distributions\r\n- \ud83d\udd17 **Lower triangle**: Scatter plots with trend lines and confidence intervals\r\n- \ud83d\udcc8 **Upper triangle**: Correlation coefficients with statistical significance indicators\r\n- \ud83c\udfaf **Multiple methods**: Support for Pearson, Spearman, and Kendall correlations\r\n- \ud83c\udfa8 **Customizable**: Full control over colors, sizes, transparency, and statistical display\r\n- \ud83d\udcda **Documentation**: Comprehensive examples and usage guide added\r\n- \ud83e\uddea **Tests**: Complete test coverage for all new functionality\r\n\r\n**Improvements:**\r\n- Enhanced error handling and input validation\r\n- Better integration with existing plotting functions\r\n- Updated examples and documentation\r\n- Improved code organization and type hints\r\n\r\n### Version 0.2.1 (June 20, 2025)\r\n- Stability improvements and bug fixes\r\n- Enhanced documentation\r\n\r\n### Version 0.2.0 (June 20, 2025)\r\n- Initial stable release with core plotting functions\r\n",
    "bugtrack_url": null,
    "license": "MIT License\r\n        \r\n        Copyright (c) 2025 Izzet Turkalp Akbasli\r\n        \r\n        Permission is hereby granted, free of charge, to any person obtaining a copy\r\n        of this software and associated documentation files (the \"Software\"), to deal\r\n        in the Software without restriction, including without limitation the rights\r\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n        copies of the Software, and to permit persons to whom the Software is\r\n        furnished to do so, subject to the following conditions:\r\n        \r\n        The above copyright notice and this permission notice shall be included in all\r\n        copies or substantial portions of the Software.\r\n        \r\n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n        SOFTWARE.\r\n        ",
    "summary": "matplotlib Based Publication-Ready Plots",
    "version": "0.3.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/turkalpmd/ggpubpy/issues",
        "Documentation": "https://github.com/turkalpmd/ggpubpy/wiki",
        "Homepage": "https://github.com/turkalpmd/ggpubpy",
        "Repository": "https://github.com/turkalpmd/ggpubpy.git"
    },
    "split_keywords": [
        "matplotlib",
        " plotting",
        " visualization",
        " statistics",
        " publication",
        " ggplot",
        " data-science"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "17a302aa3330caa6e19d853a0ef479653c6dac050898c1ffe75e4564addd4cbc",
                "md5": "c47950ce692f5ffe8b81e248af14a0a3",
                "sha256": "2d6d2b16c123805537edce2c7c51a4c6f511fac15d7a02da980891af13e7639d"
            },
            "downloads": -1,
            "filename": "ggpubpy-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c47950ce692f5ffe8b81e248af14a0a3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19368,
            "upload_time": "2025-08-17T02:12:10",
            "upload_time_iso_8601": "2025-08-17T02:12:10.400429Z",
            "url": "https://files.pythonhosted.org/packages/17/a3/02aa3330caa6e19d853a0ef479653c6dac050898c1ffe75e4564addd4cbc/ggpubpy-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "10107710dcdc9482f4e618df22cdb1d1168e74ff96a3f9d3eec487e0d004ebb8",
                "md5": "247017a246f46c0bbe56d018971010c6",
                "sha256": "2e6899cc741d86fafb63acaa51a8e25a0edb90508b7aa57b6991fd4f2e444957"
            },
            "downloads": -1,
            "filename": "ggpubpy-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "247017a246f46c0bbe56d018971010c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 33745,
            "upload_time": "2025-08-17T02:12:11",
            "upload_time_iso_8601": "2025-08-17T02:12:11.663958Z",
            "url": "https://files.pythonhosted.org/packages/10/10/7710dcdc9482f4e618df22cdb1d1168e74ff96a3f9d3eec487e0d004ebb8/ggpubpy-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-17 02:12:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "turkalpmd",
    "github_project": "ggpubpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.20.0"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    ">=",
                    "3.5.0"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    ">=",
                    "1.7.0"
                ]
            ]
        }
    ],
    "lcname": "ggpubpy"
}
        
Elapsed time: 1.24107s