# -*- coding: utf-8 -*-
from distutils.core import setup

packages = \
['psychrochart']

package_data = \
{'': ['*'], 'psychrochart': ['chart_styles/*']}

install_requires = \
['matplotlib>=3.1,<4.0',
 'numpy>=1.17,<2.0',
 'psychrolib>=2.2,<3.0',
 'scipy>=1.3,<2.0']

setup_kwargs = {
    'name': 'psychrochart',
    'version': '0.3.1',
    'description': 'A python 3 library to make psychrometric charts and overlay information on them',
    'long_description': '# Psychrochart [![Travis Status](https://travis-ci.org/azogue/psychrochart.svg?branch=master)](https://travis-ci.org/azogue/psychrochart) [![Coverage Status](https://coveralls.io/repos/github/azogue/psychrochart/badge.svg?branch=master)](https://coveralls.io/github/azogue/psychrochart?branch=master) [![PyPi](https://pypip.in/v/psychrochart/badge.svg)](https://pypi.org/project/psychrochart/) [![Wheel](https://pypip.in/wheel/psychrochart/badge.svg)](https://pypi.org/project/psychrochart/)\n\n\nA python 3 library to make **[psychrometric charts](https://en.wikipedia.org/wiki/Psychrometrics)** and overlay information on them.\n\nIt implements a useful collection of psychrometric equations for moisture and humid air calculations, and the generation of beautiful and high customizable **psychrometric charts in SVG** with [`matplotlib`](https://matplotlib.org).\n\n**Psychrometric calculations to make the chart data are done with [`PsychroLib`](https://github.com/psychrometrics/psychrolib)** (summary paper in https://doi.org/10.21105/joss.01137).\n\n<img src="https://rawgit.com/azogue/psychrochart/master/tests/charts/chart_overlay_style_minimal.svg" width="100%" height="100%">\n\n## Install\n\nGet it **[from pypi](https://pypi.python.org/pypi?:action=display&name=psychrochart)** or **[clone it](https://github.com/azogue/psychrochart.git)** if you want to run the tests.\n\n```bash\npip install psychrochart\n```\n\n## Features\n\n- **SI** units (with temperatures in celsius for better readability).\n- Easy style customization with a **JSON template** (colors, line styles and line widths).\n- Psychrometric charts within temperature and humidity ratio ranges, for any pressure\\*, with:\n    * **Saturation line**\n    * **Constant RH lines**\n    * **Constant enthalpy lines**\n    * **Constant wet-bulb temperature lines**\n    * **Constant specific volume lines**\n    * **Constant dry-bulb temperature lines** (internal orthogonal grid, vertical)\n    * **Constant humidity ratio lines** (internal orthogonal grid, horizontal)\n- Plot legend for each family of lines\n- Specify labels for each family of lines\n- **Overlay points, zones, arrows...**\n- **Export SVG, PNG files**\n\n\\* The ranges of temperature, humidity and pressure where this library should provide good results are within the normal environments for people to live in. Don\'t expect right results if doing other type of thermodynamic calculations. Over saturated water vapor states are not implemented.\n\n## Usage\n\n```python\nfrom psychrochart import PsychroChart\n\n# Load default style:\nchart_default = PsychroChart()\naxes = chart_default.plot()\naxes.get_figure()\n```\n\nCalled from a terminal (`python psychrochart`), it plots and shows the default chart using the default matplotlib backend, equivalent to this python script:\n```python\nfrom psychrochart import PsychroChart\nimport matplotlib.pyplot as plt\n\nPsychroChart().plot(ax=plt.gca())\nplt.show()\n```\n\n\n### Chart customization\n\nThe default styling for charts is defined in JSON files that you can change, or you can pass a path of a file in JSON, or a dict, when you create the psychrometric chart object.\nIncluded styles are: `default`, `ashrae`, `interior` and `minimal`.\n\n```python\nfrom psychrochart import load_config, PsychroChart\n\n# Load preconfigured styles:\nchart_ashrae_style = PsychroChart(\'ashrae\')\nchart_ashrae_style.plot()\n\nchart_minimal = PsychroChart(\'minimal\')\nchart_minimal.plot()\n\n# Get a preconfigured style dict\ndict_config = load_config(\'interior\')\n\n# Specify the styles JSON file:\nchart_custom = PsychroChart(\'/path/to/json_file.json\')\nchart_custom.plot()\n\n# Pass a dict with the changes wanted:\ncustom_style = {\n    "figure": {\n        "figsize": [12, 8],\n        "base_fontsize": 12,\n        "title": "My chart",\n        "x_label": None,\n        "y_label": None,\n        "partial_axis": False\n    },\n    "limits": {\n        "range_temp_c": [15, 30],\n        "range_humidity_g_kg": [0, 25],\n        "altitude_m": 900,\n        "step_temp": .5\n    },\n    "saturation": {"color": [0, .3, 1.], "linewidth": 2},\n    "constant_rh": {"color": [0.0, 0.498, 1.0, .7], "linewidth": 2.5,\n                    "linestyle": ":"},\n    "chart_params": {\n        "with_constant_rh": True,\n        "constant_rh_curves": [25, 50, 75],\n        "constant_rh_labels": [25, 50, 75],\n        "with_constant_v": False,\n        "with_constant_h": False,\n        "with_constant_wet_temp": False,\n        "with_zones": False\n    }\n}\n\nchart_custom_2 = PsychroChart(custom_style)\nchart_custom_2.plot()\n```\n\nThe custom configuration does not need to include all fields, but only the fields you want to change.\n\nTo play with it and see the results, look at this **[notebook with usage examples](https://github.com/azogue/psychrochart/blob/master/notebooks/Usage%20example%20of%20psychrochart.ipynb)**.\n\n## Tests\n\nTo run the tests, clone the repository, `poetry install` it, and run `poetry run pytest`.\n\n## License\n\n[MIT license](https://github.com/azogue/psychrochart/blob/master/LICENSE), so do with it as you like ;-)\n\n## Included styling examples\n\n**Default style**:\n\n<img src="https://rawgit.com/azogue/psychrochart/master/tests/charts/test_default_psychrochart.svg" width="100%" height="100%">\n\n**ASHRAE Handbook black and white style**:\n\n<img src="https://rawgit.com/azogue/psychrochart/master/tests/charts/test_ashrae_psychrochart.svg" width="100%" height="100%">\n\n**ASHRAE Handbook black and white style (IP units)**:\n\n<img src="https://rawgit.com/azogue/psychrochart/master/tests/charts/test_ashrae_psychrochart_ip.svg" width="100%" height="100%">\n\n**Minimal style**:\n\n<img src="https://rawgit.com/azogue/psychrochart/master/tests/charts/test_minimal_psychrochart.svg" width="100%" height="100%">\n',
    'author': 'Eugenio Panadero',
    'author_email': 'eugenio.panadero@gmail.com',
    'url': 'https://github.com/azogue/psychrochart',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'python_requires': '>=3.6,<4.0',
}


setup(**setup_kwargs)
