Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dose it supports inline vector graph #119

Open
Behemoth-s opened this issue Mar 4, 2019 · 3 comments
Open

Dose it supports inline vector graph #119

Behemoth-s opened this issue Mar 4, 2019 · 3 comments

Comments

@Behemoth-s
Copy link

I have tried %plot --format=svg , but it seems not work.

@jdtuck
Copy link

jdtuck commented Nov 16, 2019

I get this error

Error in calling magic 'plot' on line:
    'MatlabKernel' object has no attribute '_validated_plot_settings'
    args: []
    kwargs: {'height': None, 'width': None, 'resolution': None, 'backend': 'inline', 'format': 'svg', 'size': None}
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.7/site-packages/metakernel/magic.py", line 94, in call_magic
    func(*args, **kwargs)
  File "/opt/anaconda3/lib/python3.7/site-packages/metakernel/magics/plot_magic.py", line 58, in line_plot
    self.kernel.handle_plot_settings()
  File "/opt/anaconda3/lib/python3.7/site-packages/matlab_kernel/kernel.py", line 192, in handle_plot_settings
    settings = self._validated_plot_settings
AttributeError: 'MatlabKernel' object has no attribute '_validated_plot_settings'

%plot [options] backend - configure plotting for the session.

This line magic will configure the plot settings for this
language.

Examples:
    %plot qt --format=png
    %plot inline -w 640

Note: not all languages may support the %plot magic, and not all
options may be supported.

Options:
-------
-h --height    Plot height in pixels
-w --width     Plot width in pixels
-r --resolution Resolution in pixels per inch
-b --backend   Backend selection [default: inline]
-f --format    Plot format (png, svg or jpg).
-s --size      Pixel size of plots, "width,height"

@YutaKudo
Copy link

YutaKudo commented Nov 1, 2020

as @jdtuck showed, there is no option to use an inline-vector graph.

instead of that, I'm using Plotly in offline mode.
https://plotly.com/matlab/offline/

This won't produce graphs inline but in HTML file.
But, with Jupyter lab, it supports opening HTML files in tabs, so very helpful for me to see graphs interactively.

@TK-21st
Copy link

TK-21st commented Sep 29, 2021

Bumping the previous PR here #157 since it should directly address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants