{ "info": { "author": "U\u011fur \u00c7ayo\u011flu", "author_email": "urcyglu@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Science/Research", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3 :: Only" ], "description": "justplot\r\n========\r\n\r\nA thin wrapper around matplotlib, which lets you save figure and axes\r\nsettings for plot reuse.\r\n\r\nHow to install the module\r\n-------------------------\r\n\r\n``pip`` with ``--pre`` as option cause this is still an alpha build.\r\n\r\n::\r\n\r\n python3.4 -m pip install justplot --pre\r\n\r\n-- or --\r\n\r\n::\r\n\r\n git clone https://github.com/OnionNinja/justplot\r\n cd justplot\r\n python3.4 setup.py install\r\n\r\nHow to use the module [STRIKEOUT:(as intended)]\r\n-----------------------------------------------\r\n\r\nTL;DR\r\n^^^^^\r\n\r\n.. code:: python\r\n\r\n from justplot import justplot as jp\r\n import numpy\r\n\r\n lat = np.asarray([-90,-60,-30,0,30,60,90])\r\n lon = np.asarray([-180,-150,-120,-90,-60,-30,0,30,60,90,120,150,180])\r\n lat,lon = np.meshgrid(lat, lon)\r\n temp = np.random.randint(10,35,(13,7))\r\n wind = np.random.randint(100,300,(13,7))\r\n\r\n awesome = jp.JustPlot(\r\n title = \"Where is it hot?\",\r\n xlabel = \"Latitude\",\r\n ylabel = \"Longitude\",\r\n # add more options here\r\n )\r\n awesome.add_contourf(lat,lon,temp,ylabel=\"Temperature (K)\", colorbar=True)\r\n awesome.save(\"Sun.pdf\",\"pdf\")\r\n\r\n windy = awesome.copy()\r\n windy(title=\"A little bit windy don't ya think?\")\r\n windy.add_contour(lat,lon,wind,ylabel=\"Wind\")\r\n windy.save(\"Wind.pdf\",\"pdf\")\r\n\r\nUsage\r\n^^^^^\r\n\r\nLet's say we have some data we want to plot (suprise!). As an example I\r\nwill use a small data set from\r\n`ucar `__.\r\n\r\nFirst off we have to load the data.\r\n\r\n.. code:: python\r\n\r\n import xarray\r\n import numpy as np\r\n\r\n data = xarray.open_dataset('sresa1b_ncar_ccsm3-example.nc', decode_times=False) #pretty cryptic, I know\r\n lat = data.lat.data\r\n lon = data.lon.data\r\n temp = data.tas.data[0,:,:]\r\n wind = data.ua.data[0,4,:,:]\r\n xlat,xlon = np.meshgrid(lon,lat)\r\n\r\nLet's build the figure and axes settings first.\r\n\r\n.. code:: python\r\n\r\n from justplot import justplot as jp\r\n\r\n blueprint = jp.JustPlot(\r\n title = \"Where is it hot?\",\r\n ylabel = \"Latitude\",\r\n xlabel = \"Longitude\",\r\n # add more options here\r\n )\r\n\r\nNow we can add the actual plot.\r\n\r\n.. code:: python\r\n\r\n blueprint.add_contourf(xlat,xlon,temp,label=\"Temperature\")\r\n blueprint.save('blueprint-1.png','png')\r\n\r\n.. image:: https://raw.githubusercontent.com/OnionNinja/justplot/master/example/blueprint-1.png\r\n\r\nThe title is strange and too small. Additionally the both Axes could use\r\nsome more ticks. So let's change that.\r\n\r\n.. code:: python\r\n\r\n from matplotlib.ticker import AutoMinorLocator\r\n blueprint(title={\"label\":\"World Temperature\",\"fontsize\":19},\r\n xticks=np.arange(0,361,30),\r\n yticks=np.arange(-90,91,30),\r\n xminor=AutoMinorLocator(3),\r\n yminor=AutoMinorLocator(3),\r\n )\r\n blueprint.save(\"blueprint-2.png\",'png')\r\n\r\n Basemap support will be added further down the road. It is on\r\n [STRIKEOUT:my] **our** to do list. You can quote me on that.\r\n\r\n.. image:: https://raw.githubusercontent.com/OnionNinja/justplot/master/example/blueprint-2.png\r\n\r\nGood enough. Now pretend that you like this plot sooo much that you want\r\nall your future plots to look like it. For example the one for Wind.\r\nLet's do that.\r\n\r\n.. code:: python\r\n\r\n windy = blueprint.copy()\r\n windy(title={\"label\":\"Wind\",\"fontsize\":19})\r\n windy.add_contour(xlat,xlon,wind,label=\"Wind\")\r\n windy.save(\"windy.png\",\"png\")\r\n\r\n.. image:: https://raw.githubusercontent.com/OnionNinja/justplot/master/example/windy.png\r\n\r\nLet's put all this together.\r\n\r\n.. code:: python\r\n\r\n both = windy.copy()\r\n both(title={\"label\":\"World Temperature + Wind\",\"fontsize\":19})\r\n both.add_contourf(xlat,xlon,temp,label=\"Temperature\")\r\n both.add_contour(xlat,xlon,wind,label=\"Wind\",colors=('k'))\r\n blueprint.save(\"both.png\",\"png\")\r\n\r\n.. image:: https://raw.githubusercontent.com/OnionNinja/justplot/master/example/both.png\r\n\r\n\r\nYou can find the example code and data in the `example `__\r\nfolder.\r\n\r\nHow to improve the module (aka **our** todo list)\r\n-------------------------------------------------\r\n\r\n- [ ] Save settings from y axes\r\n- [ ] Add Basemap support\r\n- [ ] Restructure\r\n- [ ] Write import function from preconfigured or used figures/axes\r\n- [x] Write README.md", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/onionninja/justplot/tarball/v0.1.2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/OnionNinja/justplot", "keywords": "plots,matplotlib,wrapper", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "justplot", "package_url": "https://pypi.org/project/justplot/", "platform": "Linux", "project_url": "https://pypi.org/project/justplot/", "project_urls": { "Download": "https://github.com/onionninja/justplot/tarball/v0.1.2", "Homepage": "https://github.com/OnionNinja/justplot" }, "release_url": "https://pypi.org/project/justplot/0.1.3a3/", "requires_dist": null, "requires_python": null, "summary": "A thin wrapper around matplotlib, which lets you save figure and axes settings.", "version": "0.1.3a3" }, "last_serial": 1929427, "releases": { "0.1.1dev": [ { "comment_text": "", "digests": { "md5": "9cfd56deee3f09f80e5f6b24399a8e00", "sha256": "57ced166598d4b39c29190f544854ea3b0b1918f7c6bedcd2151301fad5b1d29" }, "downloads": -1, "filename": "justplot-0.1.1dev.tar.gz", "has_sig": false, "md5_digest": "9cfd56deee3f09f80e5f6b24399a8e00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3468, "upload_time": "2016-01-21T12:21:00", "url": "https://files.pythonhosted.org/packages/a8/7a/fefc52eb3f0c66d7f1b95bc91aa3ee117f89b33dab8468d8aaf525aae180/justplot-0.1.1dev.tar.gz" } ], "0.1.2a1": [ { "comment_text": "", "digests": { "md5": "fc6480f5c2fa81d145176e2ed717434e", "sha256": "7fa99ab1746e6064d35961b6a9b3512d7569b11cbc9af0f5137a09ed5cd5722e" }, "downloads": -1, "filename": "justplot-0.1.2a1.tar.gz", "has_sig": false, "md5_digest": "fc6480f5c2fa81d145176e2ed717434e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3719, "upload_time": "2016-01-21T12:35:44", "url": "https://files.pythonhosted.org/packages/32/54/fa89ca4e8b2fa81b3036fca13bf5140476e19c10eedab2ad3c9541fe269c/justplot-0.1.2a1.tar.gz" } ], "0.1.2a10": [ { "comment_text": "", "digests": { "md5": "8025f551af940baa37faeb8181e4a132", "sha256": "d69cfa90b226b3d7dee58f1c240529fa3d9e431b207113a155e05575bc9cf5af" }, "downloads": -1, "filename": "justplot-0.1.2a10.tar.gz", "has_sig": false, "md5_digest": "8025f551af940baa37faeb8181e4a132", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4069, "upload_time": "2016-01-28T09:03:27", "url": "https://files.pythonhosted.org/packages/7f/e7/11177c845fa7e85795c80bc4727a45b0ee98a6c8dc3b896a698c4de2d2bb/justplot-0.1.2a10.tar.gz" } ], "0.1.2a11": [ { "comment_text": "", "digests": { "md5": "23db51a44695d6ef044fa6ce3274df19", "sha256": "afedb2d9657feeb293c2579803b436cbe152f72dffc37ad7489f60fcc21eb0ec" }, "downloads": -1, "filename": "justplot-0.1.2a11.tar.gz", "has_sig": false, "md5_digest": "23db51a44695d6ef044fa6ce3274df19", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4071, "upload_time": "2016-01-28T14:22:06", "url": "https://files.pythonhosted.org/packages/d6/7b/2bd6b7a464d33d28510fcc7098b9d460e00d4359785e6e551e544e4bb59e/justplot-0.1.2a11.tar.gz" } ], "0.1.2a2": [ { "comment_text": "", "digests": { "md5": "c970538680a8682de094e6f0968a0277", "sha256": "79fe98db6d46cb746b697b469d1fdbdef058ef44f056a347dcf5112dd028ffb7" }, "downloads": -1, "filename": "justplot-0.1.2a2.tar.gz", "has_sig": false, "md5_digest": "c970538680a8682de094e6f0968a0277", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3744, "upload_time": "2016-01-21T12:43:05", "url": "https://files.pythonhosted.org/packages/c7/3d/a9bacdf715540cc83277f9d5629fcb9dc3b72e6e8ced5157fc6e1f5a8837/justplot-0.1.2a2.tar.gz" } ], "0.1.2a3": [ { "comment_text": "", "digests": { "md5": "9b6f74eded8c258a35dda957280ba0f7", "sha256": "936ce6ed5f009e9146679a1abaf52d4e72a6063b60531ab3aad995b42361a682" }, "downloads": -1, "filename": "justplot-0.1.2a3.tar.gz", "has_sig": false, "md5_digest": "9b6f74eded8c258a35dda957280ba0f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3770, "upload_time": "2016-01-21T13:20:36", "url": "https://files.pythonhosted.org/packages/5f/fa/b176ac4a58cc38478066eb055cb91df001d3e59f076754dc99514562ceaa/justplot-0.1.2a3.tar.gz" } ], "0.1.2a4": [ { "comment_text": "", "digests": { "md5": "366b30f98e7141248b58207247fe17c2", "sha256": "31f41b8195f2e34508a98e4c74f7d3c1b414cc55c62f82ae9a10a80b16baa8cd" }, "downloads": -1, "filename": "justplot-0.1.2a4.tar.gz", "has_sig": false, "md5_digest": "366b30f98e7141248b58207247fe17c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3916, "upload_time": "2016-01-21T19:14:06", "url": "https://files.pythonhosted.org/packages/6c/29/b1fbdfc9f4ccabf5e1bea7b716e580915674de3b6dfe622f35e88e38bc3e/justplot-0.1.2a4.tar.gz" } ], "0.1.2a5": [ { "comment_text": "", "digests": { "md5": "fe3caf8c4cc479e2b3a9a1dbce661d5e", "sha256": "0a0077e44019405ed4e6612f4f248ced9f9cbce434faf556fe2a6beb802a0e7f" }, "downloads": -1, "filename": "justplot-0.1.2a5.tar.gz", "has_sig": false, "md5_digest": "fe3caf8c4cc479e2b3a9a1dbce661d5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3865, "upload_time": "2016-01-21T19:29:33", "url": "https://files.pythonhosted.org/packages/be/c2/b4ccd1a6d452262f2d21bffeb949ad32aabbb1f46c2da5f837318ebd5986/justplot-0.1.2a5.tar.gz" } ], "0.1.2a6": [ { "comment_text": "", "digests": { "md5": "c4c329f813e925104359c0a655c9225f", "sha256": "f1ead1217fa0dfd3e98ac440631f65ae0e79fabd711ba3360c0d38962b1dbb29" }, "downloads": -1, "filename": "justplot-0.1.2a6.tar.gz", "has_sig": false, "md5_digest": "c4c329f813e925104359c0a655c9225f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4050, "upload_time": "2016-01-23T18:43:00", "url": "https://files.pythonhosted.org/packages/1d/15/3338574577945e1b6061efce7e2725e86e965b0bcd0ee31f4aea6f38149d/justplot-0.1.2a6.tar.gz" } ], "0.1.3a1": [ { "comment_text": "", "digests": { "md5": "9ebb57bbec5777ed4c0b8766cd59d6be", "sha256": "ad470aa57c025ddeda56cd7307980fdcdeecca8d15f5d8eaec26c71e879eceee" }, "downloads": -1, "filename": "justplot-0.1.3a1.tar.gz", "has_sig": false, "md5_digest": "9ebb57bbec5777ed4c0b8766cd59d6be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5534, "upload_time": "2016-01-29T12:57:49", "url": "https://files.pythonhosted.org/packages/3d/df/e5963ce0d913e387bab65aaa0fa2fa1f9e90d729b69e9bf3dafd160d7497/justplot-0.1.3a1.tar.gz" } ], "0.1.3a2": [ { "comment_text": "", "digests": { "md5": "1b9a66a5ef0c810ab3fa1d1e91a25587", "sha256": "0378d4d1298cb34ac991455f3938a2e98bc25cfe8416f30602635793fb8dab8f" }, "downloads": -1, "filename": "justplot-0.1.3a2.tar.gz", "has_sig": false, "md5_digest": "1b9a66a5ef0c810ab3fa1d1e91a25587", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5554, "upload_time": "2016-01-29T14:06:23", "url": "https://files.pythonhosted.org/packages/1d/14/fa25bd13b70b9b83c215989417fd7875d8d52fc34f628a2b76c49aa95c2d/justplot-0.1.3a2.tar.gz" } ], "0.1.3a3": [ { "comment_text": "", "digests": { "md5": "36dcba09d4704c49b7f3f0807f42f861", "sha256": "edb527d7fa65882faf85373e2bacf6f897a6c074e306a65e967fe218b5acd1dc" }, "downloads": -1, "filename": "justplot-0.1.3a3.tar.gz", "has_sig": false, "md5_digest": "36dcba09d4704c49b7f3f0807f42f861", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5554, "upload_time": "2016-01-29T14:20:41", "url": "https://files.pythonhosted.org/packages/2a/e1/edbe13563e6b005c2d7967ebabbebb389274ec467b4c58cdb79e7318ea35/justplot-0.1.3a3.tar.gz" } ], "0.1dev": [ { "comment_text": "", "digests": { "md5": "ac1028b8de4431655e244916301e9c12", "sha256": "b1cb0e7fabbc3b114177f88422de92382cdd400c24c50b0159c8e3a68eb807de" }, "downloads": -1, "filename": "justplot-0.1dev.tar.gz", "has_sig": false, "md5_digest": "ac1028b8de4431655e244916301e9c12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3463, "upload_time": "2016-01-21T12:20:06", "url": "https://files.pythonhosted.org/packages/10/69/9f02b2dd8a14cf3d593ef8b708cd83487557bf4a4d24aa455240058e4d8e/justplot-0.1dev.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "36dcba09d4704c49b7f3f0807f42f861", "sha256": "edb527d7fa65882faf85373e2bacf6f897a6c074e306a65e967fe218b5acd1dc" }, "downloads": -1, "filename": "justplot-0.1.3a3.tar.gz", "has_sig": false, "md5_digest": "36dcba09d4704c49b7f3f0807f42f861", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5554, "upload_time": "2016-01-29T14:20:41", "url": "https://files.pythonhosted.org/packages/2a/e1/edbe13563e6b005c2d7967ebabbebb389274ec467b4c58cdb79e7318ea35/justplot-0.1.3a3.tar.gz" } ] }