regmonkey_style


Nameregmonkey_style JSON
Version 1.6.1 PyPI version JSON
download
home_pagehttps://github.com/RyoNakagami
Summaryplotly and matplotlib style for statistics-for-regression-monkey
upload_time2024-10-18 08:00:31
maintainerNone
docs_urlNone
authorRyoNak
requires_python<4.0,>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Sure, here's a README for the [`regmonkey_style`](https://github.com/RyoNakagami/regmonkey-style) package:

# regmonkey_style

[`regmonkey_style`](https://github.com/RyoNakagami/regmonkey-style) is a Python package designed to simplify the customization of Plotly visualizations. It provides functions to set default fonts, show available fonts and templates, set custom fonts and templates, and ensure equal scaling for x and y axes in Plotly figures.

## Installation

To install the package, use pip:

```sh
pip install git+https://github.com/ryonakagami/regmonkey_style.git
```

## Usage

### Importing the Package

```python
from regmonkey_style import set_default, show_available_fonts, show_available_templates, set_font, set_templates, equal_xy_scale, restore_default
```

### Functions

#### `set_default()`

Sets the default font style for Plotly visualizations.

```python
set_default()
```

#### `show_available_fonts()`

Returns a list of available fonts.

```python
fonts = show_available_fonts()
print(fonts)
```

#### `show_available_templates()`

Returns a list of available templates.

```python
templates = show_available_templates()
print(templates)
```

#### `set_font(font)`

Sets a custom font for Plotly visualizations. Raises a [`ValueError`] if the font is not in the available list.

```python
try:
    set_font('CustomFont')
except ValueError as e:
    print(e)
```

#### `set_templates(template)`

Sets a custom template for Plotly visualizations. Raises a [`ValueError`] if the template is not in the available list.

```python
try:
    set_templates('CustomTemplate')
except ValueError as e:
    print(e)
```

#### `equal_xy_scale(figure_object)`

Ensures that the x and y axes of a Plotly figure have equal scaling.

```python
import plotly.graph_objects as go

fig = go.Figure()
# Add data to the figure
fig = equal_xy_scale(fig)
fig.show()
```

#### `restore_default()`

Restores the default Plotly template.

```python
restore_default()
```

## License

This project is licensed under the MIT License. See the [LICENSE](https://github.com/RyoNakagami/regmonkey-style/blob/main/LICENSE) file for details.

## Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

## Contact

For any questions or issues, please contact the maintainer at [Ryo Nakagami](nakagamiryo@alumni.u-tokyo.ac.jp).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/RyoNakagami",
    "name": "regmonkey_style",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "RyoNak",
    "author_email": "nakagamiryo0901@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/73/c4/1913900b865ea450b79966e13c5e2c99563f69c29285c76dbc25a7395b44/regmonkey_style-1.6.1.tar.gz",
    "platform": null,
    "description": "Sure, here's a README for the [`regmonkey_style`](https://github.com/RyoNakagami/regmonkey-style) package:\n\n# regmonkey_style\n\n[`regmonkey_style`](https://github.com/RyoNakagami/regmonkey-style) is a Python package designed to simplify the customization of Plotly visualizations. It provides functions to set default fonts, show available fonts and templates, set custom fonts and templates, and ensure equal scaling for x and y axes in Plotly figures.\n\n## Installation\n\nTo install the package, use pip:\n\n```sh\npip install git+https://github.com/ryonakagami/regmonkey_style.git\n```\n\n## Usage\n\n### Importing the Package\n\n```python\nfrom regmonkey_style import set_default, show_available_fonts, show_available_templates, set_font, set_templates, equal_xy_scale, restore_default\n```\n\n### Functions\n\n#### `set_default()`\n\nSets the default font style for Plotly visualizations.\n\n```python\nset_default()\n```\n\n#### `show_available_fonts()`\n\nReturns a list of available fonts.\n\n```python\nfonts = show_available_fonts()\nprint(fonts)\n```\n\n#### `show_available_templates()`\n\nReturns a list of available templates.\n\n```python\ntemplates = show_available_templates()\nprint(templates)\n```\n\n#### `set_font(font)`\n\nSets a custom font for Plotly visualizations. Raises a [`ValueError`] if the font is not in the available list.\n\n```python\ntry:\n    set_font('CustomFont')\nexcept ValueError as e:\n    print(e)\n```\n\n#### `set_templates(template)`\n\nSets a custom template for Plotly visualizations. Raises a [`ValueError`] if the template is not in the available list.\n\n```python\ntry:\n    set_templates('CustomTemplate')\nexcept ValueError as e:\n    print(e)\n```\n\n#### `equal_xy_scale(figure_object)`\n\nEnsures that the x and y axes of a Plotly figure have equal scaling.\n\n```python\nimport plotly.graph_objects as go\n\nfig = go.Figure()\n# Add data to the figure\nfig = equal_xy_scale(fig)\nfig.show()\n```\n\n#### `restore_default()`\n\nRestores the default Plotly template.\n\n```python\nrestore_default()\n```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/RyoNakagami/regmonkey-style/blob/main/LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\n\n## Contact\n\nFor any questions or issues, please contact the maintainer at [Ryo Nakagami](nakagamiryo@alumni.u-tokyo.ac.jp).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "plotly and matplotlib style for statistics-for-regression-monkey",
    "version": "1.6.1",
    "project_urls": {
        "Homepage": "https://github.com/RyoNakagami",
        "Repository": "https://github.com/RyoNakagami/regmonkey-style"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "093e097f90fb777f9568e4fb982209ab3a110ca840b9b04dd67d5c97b4082d8c",
                "md5": "922abbfed8e3cf3d45639fd7853aa422",
                "sha256": "fb8e91d927355e2e8f00b3b6a3b6e04bcf7527a4ab4a9c4fd6f4cc1da2518b5b"
            },
            "downloads": -1,
            "filename": "regmonkey_style-1.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "922abbfed8e3cf3d45639fd7853aa422",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 5193924,
            "upload_time": "2024-10-18T08:00:13",
            "upload_time_iso_8601": "2024-10-18T08:00:13.974321Z",
            "url": "https://files.pythonhosted.org/packages/09/3e/097f90fb777f9568e4fb982209ab3a110ca840b9b04dd67d5c97b4082d8c/regmonkey_style-1.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "73c41913900b865ea450b79966e13c5e2c99563f69c29285c76dbc25a7395b44",
                "md5": "ec5062d8e13f1a5c1928991222751a96",
                "sha256": "173ef2f0e21de3492e36a94076a88bd358be33c0b1d1285b37e6260057d2b6a2"
            },
            "downloads": -1,
            "filename": "regmonkey_style-1.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ec5062d8e13f1a5c1928991222751a96",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 5189702,
            "upload_time": "2024-10-18T08:00:31",
            "upload_time_iso_8601": "2024-10-18T08:00:31.972605Z",
            "url": "https://files.pythonhosted.org/packages/73/c4/1913900b865ea450b79966e13c5e2c99563f69c29285c76dbc25a7395b44/regmonkey_style-1.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-18 08:00:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "RyoNakagami",
    "github_project": "regmonkey-style",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "regmonkey_style"
}
        
Elapsed time: 0.95084s