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

add support for plotting polygons? #1133

Open
bradenfrigoletto24 opened this issue Nov 16, 2023 · 2 comments
Open

add support for plotting polygons? #1133

bradenfrigoletto24 opened this issue Nov 16, 2023 · 2 comments

Comments

@bradenfrigoletto24
Copy link

I really like this tool, but I noticed it doesn't seem to currently support plotting polygon objects from MATLAB.

In my use case, I like to use shaded polygon objects to represent error bounds on data as opposed to using the built-in errorbar plotting functionality; I like the aesthetics of it and find it easier to read and interpret - see the attached sample where I compare the two. I create the polygons with the polyshape MATLAB function and add them to my figures with a simple plot call. When trying to convert the figure to a .tex using matlab2tikz() I get the following error: Warning: matlab2tikz does not know how to handle object with type "polygon"

Any chance m2t can add support for polygon objects?

error_polygon_sample

@bradenfrigoletto24
Copy link
Author

To follow up on this, I recently discovered that using the patch plot command looks exactly the same as the polygon and is already supported by matlab2tikz. I'll use patch from now on.

@egeerardyn
Copy link
Member

@bradenfrigoletto24 Indeed, patch should give you very similar results.
Now, I do not have any time for matlab2tikz development, but I would think that this should be rather easy to implement based on the implementation of patch: i.e. an easy way to get started with writing the code.

If you would need any help on that, for that I could free up some time to mentor.

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

2 participants