{ "info": { "author": "George Oblapenko", "author_email": "kunstmord@kunstmord.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering :: Visualization" ], "description": "SanePlot\n========\n\nA simple wrapper around some basic 2d matplotlib plotting which has some sane defaults. Developed mostly for personal use.\n\n----\n\nMotivation and use-cases:\n\n * Quickly set up multiple plot parameters (font sizes, text position, curve colors, x and y scales) without having to remember how to do that; provide some sane defaults\n\n * Have all this code in one place and not scattered around multiple jupyter notebooks\n\n * All of the above allows to quickly create plots of 2d dimensional data\n\n\nUsage\n-----\n\nEverything is done by the SanePlot class. The initialization parameters which control the plot are:\n\n * ``figsize=(14.0, 10.0)`` - the size of the plot\n\n * ``legendloc='upper right'`` - the legend location\n\n * ``legend_frame_color='#FFFFFF'`` - color of the legend background\n\n * ``fontfamily='fantasy', font='Calibri'`` - these two parameters control the font. I only set them to use Cyrillic characters\n\n * ``legend_size=26`` - legend font size\n\n * ``tick_size=24`` - tick label size\n\n * ``xy_label_size=32`` - set the size of the X and Y axis labels\n\n * ``textsize=27`` - set the text size\n\n * ``linewidth=5`` - the width of the curves being plotted\n\n * ``markersize=5`` - the size of the markers being plotted\n\n * ``xlim=None`` - either None or a tuple/list; if set, sets the X-limits of the plot\n\n * ``ylim=None`` - either None or a tuple/list; if set, sets the Y-limits of the plot\n\n * ``text=None`` - either None or a string; if set, will place text somewhere on the plot\n\n * ``text_x_rel=None`` - controls the relative X-position of the text (thus, a value of 0.5 will place the text in the middle of the plot with respect to the X-axis)\n\n * ``text_x_abs=None`` - controls the absolute X-position of the text. If text_x_rel is set, will not do anything\n\n * ``text_y_rel=None`` - controls the relative Y-position of the text (thus, a value of 0.5 will place the text in the middle of the plot with respect to the Y-axis)\n\n * ``text_y_abs=None`` - controls the absolute Y-position of the text. If text_x_rel is set, will not do anything\n\n * ``log_x_base=0`` - if set to 0, the X axis is normal (linear). If different from 0, then the X axis is a log-axis with base equal to ``log_x_base``\n\n * ``log_y_base=0`` - if set to 0, the Y axis is normal (linear). If different from 0, then the X axis is a log-axis with base equal to ``log_y_base``\n\n * ``x_label=None`` - the label for the X axis\n\n * ``y_label=None`` - the label for the Y axis\n\n * ``linechange='monochrome'`` - sets the line styles. Can be either ``monochrome``, ``color`` or a list.\n If it is a list, curve number N on the plot will be plotted with a style set by the element number (N-1) % len(linechange) of the list.\n The list corresponding to ``'monochrome'``: ['k-', 'k--', 'ko', 'k^', 'k:', 'k*']\n The list corresponding to ``'color'``: ['k', 'g', 'b', 'r', 'c']\n\n\n\nThe methods are:\n\n * ``SanePlot.add_text(textsize=None)`` - adds text specified during the initialization. You can override the originally set textsize. Returns the Figure object.\n\n * ``SanePlot.plot(x, y, label=None, linewidth=None, markersize=None)`` - plots the curve specified by the (x,y) arrays.\n The label is set by the ``label`` parameter, and the originally set linewidth and markersize can be overridden. Returns the Figure object.\n\n * ``SanePlot.legend()`` - show the legend. Returns the Figure object.\n\n * ``SanePlot.show()`` - returns the Figure object.\n\n\nExamples\n--------\n\nThis can be inserted into a Jupyter notebook with ``%matplotlib inline`` added and will show the resulting plots right there.::\n\n import numpy as np\n from saneplot import SanePlot\n\n x = np.linspace(0, 30, 100)\n y1 = np.sin(x) * 1000 + 4000\n y2 = np.cos(x) * 1000 + 4000\n y3 = x**2 * 1000\n\n sp = SanePlot(x_label='x', y_label='y', text='(a)', text_x_abs=10, text_y_rel=0.5)\n\n sp.plot(x, y1, '0')\n sp.plot(x, y2+100, 'y2', linewidth=4)\n sp.plot(x, y2+500, 'y2', linewidth=4)\n sp.plot(x, y2+1000, 'y2', linewidth=3)\n sp.plot(x, y2+2000, 'y2', linewidth=3)\n sp.plot(x, y2+4000, 'y2', linewidth=4)\n sp.plot(x, y2+8000, 'y2', linewidth=5)\n sp.add_text(textsize=10)\n sp.legend()\n\nVersion history\n---------------\n\n * 0.1 (01 February 2017) - first working version of the package created", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/knstmrd/SanePlot", "keywords": "numerical scientific plotting", "license": "MPL 2.0", "maintainer": null, "maintainer_email": null, "name": "saneplot", "package_url": "https://pypi.org/project/saneplot/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/saneplot/", "project_urls": { "Homepage": "https://github.com/knstmrd/SanePlot" }, "release_url": "https://pypi.org/project/saneplot/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "A simple plotting tool with sane default", "version": "0.1.0" }, "last_serial": 2612105, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "60875ef27a68926c806fcbf4afd66e69", "sha256": "5dff96d9ec21a9f1d986ff792cb5191ebb69853e1ee5a22963d91c45ec8e7abe" }, "downloads": -1, "filename": "saneplot-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "60875ef27a68926c806fcbf4afd66e69", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5330, "upload_time": "2017-02-01T17:11:06", "url": "https://files.pythonhosted.org/packages/40/0c/541edc4296adaa4da382364d51e8de9f8abfc8f2d5fabbe53469148fdf66/saneplot-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "72ebc70335b81b3da3715ba673fc03e0", "sha256": "596fe5a31e1cea3fcfa5b471613f2de3e8a4aee882417a09f192bd8e40420c13" }, "downloads": -1, "filename": "saneplot-0.1.0.tar.gz", "has_sig": false, "md5_digest": "72ebc70335b81b3da3715ba673fc03e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4179, "upload_time": "2017-02-01T17:11:07", "url": "https://files.pythonhosted.org/packages/e5/fc/498579696047b4a236e0cdd44628771ab025942bb01d282c718fd6028573/saneplot-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "60875ef27a68926c806fcbf4afd66e69", "sha256": "5dff96d9ec21a9f1d986ff792cb5191ebb69853e1ee5a22963d91c45ec8e7abe" }, "downloads": -1, "filename": "saneplot-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "60875ef27a68926c806fcbf4afd66e69", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5330, "upload_time": "2017-02-01T17:11:06", "url": "https://files.pythonhosted.org/packages/40/0c/541edc4296adaa4da382364d51e8de9f8abfc8f2d5fabbe53469148fdf66/saneplot-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "72ebc70335b81b3da3715ba673fc03e0", "sha256": "596fe5a31e1cea3fcfa5b471613f2de3e8a4aee882417a09f192bd8e40420c13" }, "downloads": -1, "filename": "saneplot-0.1.0.tar.gz", "has_sig": false, "md5_digest": "72ebc70335b81b3da3715ba673fc03e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4179, "upload_time": "2017-02-01T17:11:07", "url": "https://files.pythonhosted.org/packages/e5/fc/498579696047b4a236e0cdd44628771ab025942bb01d282c718fd6028573/saneplot-0.1.0.tar.gz" } ] }