{ "info": { "author": "Antony Lee", "author_email": "", "bugtrack_url": null, "classifiers": [ "Framework :: IPython", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: System :: Shells" ], "description": "A Jupyter kernel for MATLAB\n===========================\n\n|Python35| |MATLAB2016b| |PyPI|\n\n.. |Python35| image:: https://img.shields.io/badge/python-3.5%2B-blue.svg\n.. |MATLAB2016b| image:: https://img.shields.io/badge/MATLAB-2016b%2B-blue.svg\n.. |PyPI|\n image:: https://img.shields.io/pypi/v/imatlab.svg\n :target: https://pypi.python.org/pypi/imatlab\n\n.. contents:: :local:\n\nThis kernel requires Jupyter_ with Python 3.5+, and the `MATLAB engine for\nPython`_ R2016b+ (this release provides a much better completion API), which\nneeds to be installed first. Note that additionally, Python versions not\nsupported by the engine are likewise not supported by the kernel.\n\n.. _Jupyter: http://jupyter.readthedocs.org/en/latest/install.html\n.. _MATLAB engine for Python: https://www.mathworks.com/help/matlab/matlab-engine-for-python.html\n\nInstallation\n------------\n\nAs usual, install using pip:\n\n.. code-block:: sh\n\n $ pip install imatlab # from PyPI\n $ pip install git+https://github.com/imatlab/imatlab # from Github\n\nThen, register the kernelspec with\n\n.. code:: sh\n\n $ python -mimatlab install\n\nIn the absence of administrator rights, the ``--user`` flag should be added to\nall of these commands.\n\nUse\n---\n\n.. code:: sh\n\n # Notebook (in the notebook interface, select Matlab from the 'New' menu):\n $ jupyter notebook\n # or QtConsole:\n $ jupyter qtconsole --kernel imatlab\n # or terminal:\n $ jupyter console --kernel imatlab\n\nInline graphics\n---------------\n\nMATLAB figures can be displayed in native MATLAB windows (the default), or\n(when using the notebook) as inline images. The kernel can natively display\nstatic images, or use Plotly_ to generate interactive\nJavaScript figures.\n\n.. _Plotly: https://plot.ly/\n\nThe exporter is set by calling the ``imatlab_export_fig`` function, which is\nautomatically added to the MATLAB path when the kernel is running. The\nfollowing settings are possible:\n\n.. code:: matlab\n\n imatlab_export_fig('') % Native windows.\n imatlab_export_fig('fig2plotly') % Plotly figures.\n imatlab_export_fig('print-png') % Static png figures.\n imatlab_export_fig('print-svg') % Static svg figures.\n imatlab_export_fig('print-jpeg') % Static jpeg figures.\n\nThis call must be issued before the first figure is shown. Note that the\nnon-native exporters will call ``set(0, 'defaultfigurevisible', 'off')`` to\nprevent the window from being briefly displayed, whereas using native windows\nturns the default figure visibility back ``'on'``.\n\nPlotly exporter\n```````````````\n\nTo use Plotly inline graphics in the notebook, the `Plotly MATLAB API`_\n(>=2.2.7) must be installed, as follows:\n\n.. _Plotly MATLAB API: https://plot.ly/matlab\n\n1. Clone `plotly/MATLAB-Online`_ or download it as a `zip file`_.\n2. Recursively add the resulting extracted folders to the MATLAB search path\n using ``addpath(genpath());``. Either put such a\n call in your ``startup.m``, or then call ``savepath;`` to save the path.\n3. In MATLAB, copy the required JavaScript files and initialize the\n credentials:\n\n .. code:: matlab\n\n getplotlyoffline('https://cdn.plot.ly/plotly-latest.min.js');\n try, signin; catch, saveplotlycredentials('', ''); end;\n\n (If your version of MATLAB uses an old OpenSSL, you may need to use HTTP\n instead of HTTPS.)\n\nAt the beginning of each notebook, you may then call\n``imatlab_export_fig('fig2plotly')`` to use automatically Plotly inline\ngraphics (no further calls to the Plotly API are required; in particular,\nignore the output from ``getplotlyoffline``).\n\n.. _plotly/MATLAB-Online: https://github.com/plotly/MATLAB-Online\n.. _zip file: https://github.com/plotly/MATLAB-api/archive/master.zip\n\nStatic exporters\n````````````````\n\nThe static exporters (png, svg, and jpeg) do not required additional\ndependencies.\n\nThe default size of exported figures, as well as whether to display figures\nbefore exporting them, should be set using standard figure properties (``set(0,\n'defaultpaperposition', [left, bottom, width, height]);``, etc.).\n\nCustom exporters\n````````````````\n\nFor further customization, you may override the ``imatlab_export_fig`` function\n(the default version is provided by ``imatlab`` and added to the MATLAB path).\nThis function is called with no arguments after each notebook cell is executed,\nwhile the current directory is temporarily switched to a temporary folder; this\nfunction should return a cell array of filenames with ``.html``, ``.png``, or\n``.jpg``/``.jpeg`` extension. The corresponding files, which should have been\ncreated by the function, will be loaded into the notebook.\n\nEnvironment variables\n---------------------\n\n``IMATLAB_CONNECT``\n If this environment variable is set to a valid MATLAB identifier, the kernel\n will attempt to connect to the shared engine with that name. If it is set\n to another non-empty value, it will connect to any existing shared engine.\n\n``IMATLAB_CD``\n If this environment variable is set, the engine's working directory will be\n changed to match the kernel's working directory.\n\n``IMATLAB_CONNECT`` needs to be set outside of MATLAB (as it is checked before\nthe connection to the engine is made). Other environment variables can be set\neither outside of MATLAB (before starting the kernel) or from within MATLAB\n(using ``setenv``).\n\nAsynchronous output\n-------------------\n\nA construct such as ``1, pause(1), 2`` will output ``1`` and ``2`` with a one\nsecond interval on Linux and OSX, but together after a one second wait on\nWindows. PRs improving Windows support are welcome.\n\nAsynchronous output using ``timer`` objects seem to be completely unsupported\nby the MATLAB engine for Python.\n\nMATLAB debugger\n---------------\n\nThe MATLAB debugger is cleared (``dbclear all``) before each execution, as\ninteractive input is not supported by the engine API.\n\nDifferences with the Calysto MATLAB Kernel\n------------------------------------------\n\n- The completion system is much more robust, by relying on the new API\n available in MATLAB 2016b.\n- History is read from and written to MATLAB's own ``History.xml``, and thus\n shared with standard MATLAB sessions. Note that if the file does not exist\n (e.g. if the **don't save history file** option is set, or in a console-only\n setup), history will not be reloaded into later sessions. (A PR for loading\n ``history.m`` instead would be welcome; it would need to properly parse\n multiline inputs in that file.)\n- Synchronous output is supported on Linux and OSX (see above).\n- There is no magics systems, as MATLAB already provides many functions for\n this purpose (``cd``, ``edit``, etc.).\n- Inline graphics can be based on ``plotly``, and thus interactive.\n\nTests\n-----\n\nRun tests with ``python -munittest`` or pytest_ after installing the kernel and\njupyter_kernel_test_.\n\n.. _pytest: https://pytest.org\n.. _jupyter_kernel_test: https://pypi.python.org/pypi/jupyter_kernel_test\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/imatlab/imatlab", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "imatlab", "package_url": "https://pypi.org/project/imatlab/", "platform": "", "project_url": "https://pypi.org/project/imatlab/", "project_urls": { "Homepage": "https://github.com/imatlab/imatlab" }, "release_url": "https://pypi.org/project/imatlab/0.4/", "requires_dist": [ "ipykernel (>=4.1)", "nbconvert (>=4.2)", "plotly (>=1.13.0)", "widgetsnbextension (>=1.0)", "matlabengineforpython (>=R2016b)" ], "requires_python": ">=3.5", "summary": "A Juyter kernel for MATLAB.", "version": "0.4" }, "last_serial": 5400167, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3e08ca8ef35ba6f7e8c20f235d2364fc", "sha256": "6a683df7f67335869e667bf30268c74b4a12799c3ed2b3ba5a7052ffc48abf61" }, "downloads": -1, "filename": "imatlab-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3e08ca8ef35ba6f7e8c20f235d2364fc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 8370, "upload_time": "2017-01-12T08:31:09", "url": "https://files.pythonhosted.org/packages/ae/90/c476da536c3c3e30180fde7d84ecac93594da5a73af595b1172cc598803a/imatlab-0.1-py3-none-any.whl" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "1e5ffe09a8232e83977954aa18d0e191", "sha256": "dbbec74af812f0d878d77bd497547320151462f96927785ec538747d7a74095c" }, "downloads": -1, "filename": "imatlab-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "1e5ffe09a8232e83977954aa18d0e191", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 14490, "upload_time": "2017-04-04T20:23:42", "url": "https://files.pythonhosted.org/packages/e3/b9/91919f4a37cafb88127bbf8675013a56bb01a52dbc7fa918ea456c0bb235/imatlab-0.2-py3-none-any.whl" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "b3814916cf97e331dd81d0f3daff6aca", "sha256": "52120ea41ed30ec0fe9ccb4c59178224e241a63699365bf357f3b84637c56b1c" }, "downloads": -1, "filename": "imatlab-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b3814916cf97e331dd81d0f3daff6aca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 17297, "upload_time": "2018-03-10T23:12:41", "url": "https://files.pythonhosted.org/packages/92/4d/ddd1e0df607266826ab2c3fe6641e3daaa7ca917c906595e362413894fcb/imatlab-0.3-py3-none-any.whl" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "410727aec6c5dc055dfb5d05cab8ee3b", "sha256": "81674fce9b30bfd93b321a8405d2f01bd61531437de8ba3c891444cf037deb89" }, "downloads": -1, "filename": "imatlab-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "410727aec6c5dc055dfb5d05cab8ee3b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 13958, "upload_time": "2019-06-14T11:39:22", "url": "https://files.pythonhosted.org/packages/0b/7e/8e6ff8088539bf234a548104a5d442444e9a7c883101ba4a35bf853b72c5/imatlab-0.4-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "410727aec6c5dc055dfb5d05cab8ee3b", "sha256": "81674fce9b30bfd93b321a8405d2f01bd61531437de8ba3c891444cf037deb89" }, "downloads": -1, "filename": "imatlab-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "410727aec6c5dc055dfb5d05cab8ee3b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 13958, "upload_time": "2019-06-14T11:39:22", "url": "https://files.pythonhosted.org/packages/0b/7e/8e6ff8088539bf234a548104a5d442444e9a7c883101ba4a35bf853b72c5/imatlab-0.4-py3-none-any.whl" } ] }