finres-ggpt2-matplotlib


Namefinres-ggpt2-matplotlib JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/yourusername/finres_ggpt2_matplotlib
SummaryA custom Matplotlib theme using the Poppins font styled like ggplot.
upload_time2024-09-10 08:53:23
maintainerNone
docs_urlNone
authorVhiny
requires_python>=3.6
licenseNone
keywords matplotlib theme poppins ggplot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Matplotlib Poppins Theme (Inspired by ggplot)

This package provides a custom theme for **Matplotlib**, inspired by the visual style of **ggplot**, using the **Poppins** font for a clean and modern look. 

## Features

- Custom Matplotlib theme with the Poppins font.
- Configurable options for title size, label size, boldness, and grid display.
- Inspired by ggplot2's elegant styling.

## Installation

You can install this package via pip:

```bash
pip install finres_ggpt2_matplotlib
```

## Usage
```python
import finres_ggpt2_matplotlib

# Apply the custom Poppins theme
finres_ggpt2_matplotlib.set_poppins_theme()

# Now create your plots
import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5]
y = [10, 15, 13, 17, 18]
plt.plot(x, y)
plt.title("Sample Poppins Plot")
plt.show()

```

### Customization Options

You can customize the theme by passing different options to set_poppins_theme():

```python
# Apply the Poppins theme with custom options
matplotlib_poppins_theme.set_poppins_theme(
    title_size=18,        # Custom title size
    label_size=14,        # Custom label size
    bold_title=True,      # Bold titles
    bold_labels=False,    # Non-bold axis labels
    show_grid=True        # Show grid lines
)




import matplotlib.pyplot as plt
import numpy as np

categories = ['Category A', 'Category B', 'Category C', 'Category D']
x = np.linspace(0, 10, 100)  # Shared x-axis for all plots
data = {category: np.sin(x + i) for i, category in enumerate(categories)}  # Different sine waves for each category

# Create a figure and axes for the faceted plot (2 rows, 2 columns)
fig, axes = plt.subplots(2, 2, figsize=(10, 8))  # Create a 2x2 grid of subplots
axes = axes.flatten()  # Flatten axes for easy iteration

# Iterate through each axis and plot the corresponding data
for ax, (category, y) in zip(axes, data.items()):
    ax.plot(x, y, label=category, color=np.random.rand(3,))
    ax.set_title(f"Facet: {category}", fontsize=12, weight='bold')  # Set the title for each facet
    ax.set_xlabel('X-axis')
    ax.set_ylabel('Y-axis')
    ax.legend()

# Adjust layout for better spacing
plt.tight_layout()

# Show the faceted plot
plt.show()

```
with the theme
![Faceted Plot](./Figure_1.png)

![Faceted Plot](./Figure_1.png)


### Autre example
```python
# Example plot using the custom theme
theme.set_finres_ggpt_theme(vc_fontname="Poppins", 
                            vc_cols="black", 
                            vc_colbg_plot="white", 
                            vc_colbg="#EFEFEF", 
                            title_size=18, 
                            label_size=12, 
                            tick_size=12)

# Sample plot
fig, ax = plt.subplots()

# Data for plotting
ax.plot([0, 1, 2], [0, 1, 4], label="Example Data")
ax.set_title("Example Plot Title")
ax.set_xlabel("X Axis Label")
ax.set_ylabel("Y Axis Label")

# Place the legend outside the plot (right center)
ax.legend(title="Legend Title", loc="center left", bbox_to_anchor=(1, 0.5), frameon=True)

# Adjust layout to make room for the legend
plt.subplots_adjust(right=0.75)

# Show plot
plt.show()
```

### Parameters:
- `title_size`: Sets the font size for the plot title (default is 14).
- `label_size`: Sets the font size for the axis labels (default is 12).
- `bold_title`: Boolean to specify if the title should be bold (default is `True`).
- `bold_labels`: Boolean to specify if the axis labels should be bold (default is `True`).
- `show_grid`: Boolean to specify if the grid should be shown (default is `False`).

## Contributing

Contributions are welcome! Feel free to submit a pull request or open an issue on GitHub.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yourusername/finres_ggpt2_matplotlib",
    "name": "finres-ggpt2-matplotlib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "matplotlib theme poppins ggplot",
    "author": "Vhiny",
    "author_email": "vhiny.mombo@finres.dev",
    "download_url": "https://files.pythonhosted.org/packages/0d/1a/f64c8adcfe9a2e589c26fa67b4a9458764594af82bd0b73f63a6a0b20de2/finres_ggpt2_matplotlib-0.5.0.tar.gz",
    "platform": null,
    "description": "# Matplotlib Poppins Theme (Inspired by ggplot)\n\nThis package provides a custom theme for **Matplotlib**, inspired by the visual style of **ggplot**, using the **Poppins** font for a clean and modern look. \n\n## Features\n\n- Custom Matplotlib theme with the Poppins font.\n- Configurable options for title size, label size, boldness, and grid display.\n- Inspired by ggplot2's elegant styling.\n\n## Installation\n\nYou can install this package via pip:\n\n```bash\npip install finres_ggpt2_matplotlib\n```\n\n## Usage\n```python\nimport finres_ggpt2_matplotlib\n\n# Apply the custom Poppins theme\nfinres_ggpt2_matplotlib.set_poppins_theme()\n\n# Now create your plots\nimport matplotlib.pyplot as plt\nx = [1, 2, 3, 4, 5]\ny = [10, 15, 13, 17, 18]\nplt.plot(x, y)\nplt.title(\"Sample Poppins Plot\")\nplt.show()\n\n```\n\n### Customization Options\n\nYou can customize the theme by passing different options to set_poppins_theme():\n\n```python\n# Apply the Poppins theme with custom options\nmatplotlib_poppins_theme.set_poppins_theme(\n    title_size=18,        # Custom title size\n    label_size=14,        # Custom label size\n    bold_title=True,      # Bold titles\n    bold_labels=False,    # Non-bold axis labels\n    show_grid=True        # Show grid lines\n)\n\n\n\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\ncategories = ['Category A', 'Category B', 'Category C', 'Category D']\nx = np.linspace(0, 10, 100)  # Shared x-axis for all plots\ndata = {category: np.sin(x + i) for i, category in enumerate(categories)}  # Different sine waves for each category\n\n# Create a figure and axes for the faceted plot (2 rows, 2 columns)\nfig, axes = plt.subplots(2, 2, figsize=(10, 8))  # Create a 2x2 grid of subplots\naxes = axes.flatten()  # Flatten axes for easy iteration\n\n# Iterate through each axis and plot the corresponding data\nfor ax, (category, y) in zip(axes, data.items()):\n    ax.plot(x, y, label=category, color=np.random.rand(3,))\n    ax.set_title(f\"Facet: {category}\", fontsize=12, weight='bold')  # Set the title for each facet\n    ax.set_xlabel('X-axis')\n    ax.set_ylabel('Y-axis')\n    ax.legend()\n\n# Adjust layout for better spacing\nplt.tight_layout()\n\n# Show the faceted plot\nplt.show()\n\n```\nwith the theme\n![Faceted Plot](./Figure_1.png)\n\n![Faceted Plot](./Figure_1.png)\n\n\n### Autre example\n```python\n# Example plot using the custom theme\ntheme.set_finres_ggpt_theme(vc_fontname=\"Poppins\", \n                            vc_cols=\"black\", \n                            vc_colbg_plot=\"white\", \n                            vc_colbg=\"#EFEFEF\", \n                            title_size=18, \n                            label_size=12, \n                            tick_size=12)\n\n# Sample plot\nfig, ax = plt.subplots()\n\n# Data for plotting\nax.plot([0, 1, 2], [0, 1, 4], label=\"Example Data\")\nax.set_title(\"Example Plot Title\")\nax.set_xlabel(\"X Axis Label\")\nax.set_ylabel(\"Y Axis Label\")\n\n# Place the legend outside the plot (right center)\nax.legend(title=\"Legend Title\", loc=\"center left\", bbox_to_anchor=(1, 0.5), frameon=True)\n\n# Adjust layout to make room for the legend\nplt.subplots_adjust(right=0.75)\n\n# Show plot\nplt.show()\n```\n\n### Parameters:\n- `title_size`: Sets the font size for the plot title (default is 14).\n- `label_size`: Sets the font size for the axis labels (default is 12).\n- `bold_title`: Boolean to specify if the title should be bold (default is `True`).\n- `bold_labels`: Boolean to specify if the axis labels should be bold (default is `True`).\n- `show_grid`: Boolean to specify if the grid should be shown (default is `False`).\n\n## Contributing\n\nContributions are welcome! Feel free to submit a pull request or open an issue on GitHub.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A custom Matplotlib theme using the Poppins font styled like ggplot.",
    "version": "0.5.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/yourusername/finres_ggpt2_matplotlib/issues",
        "Documentation": "https://github.com/yourusername/finres_ggpt2_matplotlib/wiki",
        "Homepage": "https://github.com/yourusername/finres_ggpt2_matplotlib",
        "Source Code": "https://github.com/yourusername/finres_ggpt2_matplotlib"
    },
    "split_keywords": [
        "matplotlib",
        "theme",
        "poppins",
        "ggplot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b60f3163e5dd5fa2dea88e9c5d139761eafb47d641e4aa04961216502e7ea17",
                "md5": "c5193f2c86daa9386b038ee6ad0544a5",
                "sha256": "7d5164850a4e7057479b94cdf45425b751fd9ea30b1ce8386cf53e95ec67a298"
            },
            "downloads": -1,
            "filename": "finres_ggpt2_matplotlib-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c5193f2c86daa9386b038ee6ad0544a5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 1356835,
            "upload_time": "2024-09-10T08:53:21",
            "upload_time_iso_8601": "2024-09-10T08:53:21.927587Z",
            "url": "https://files.pythonhosted.org/packages/6b/60/f3163e5dd5fa2dea88e9c5d139761eafb47d641e4aa04961216502e7ea17/finres_ggpt2_matplotlib-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d1af64c8adcfe9a2e589c26fa67b4a9458764594af82bd0b73f63a6a0b20de2",
                "md5": "3083a662e04d6df0a5b610522689531a",
                "sha256": "12a469a3e92a6cba6209f4db2d017a86163a7b0b591a392d3411d9bff4a4122a"
            },
            "downloads": -1,
            "filename": "finres_ggpt2_matplotlib-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3083a662e04d6df0a5b610522689531a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 1359823,
            "upload_time": "2024-09-10T08:53:23",
            "upload_time_iso_8601": "2024-09-10T08:53:23.772782Z",
            "url": "https://files.pythonhosted.org/packages/0d/1a/f64c8adcfe9a2e589c26fa67b4a9458764594af82bd0b73f63a6a0b20de2/finres_ggpt2_matplotlib-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-10 08:53:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yourusername",
    "github_project": "finres_ggpt2_matplotlib",
    "github_not_found": true,
    "lcname": "finres-ggpt2-matplotlib"
}
        
Elapsed time: 0.29963s