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

axis labels with pixel units get shifted in export #135

Open
delyle opened this issue Mar 30, 2016 · 4 comments
Open

axis labels with pixel units get shifted in export #135

delyle opened this issue Mar 30, 2016 · 4 comments

Comments

@delyle
Copy link

delyle commented Mar 30, 2016

A minimal working example is below:

close all;
xlabel('x','units','pixels')
ylabel('y','units','pixels')
export_fig('test.png')

The result is as follows:

test

The x and y labels are shifted, when they should remain in the middle of their respective axes.

I am using MATLAB 2015b for Mac and the most recent version of export_fig (as of March 30, 2016).

@altmany
Copy link
Owner

altmany commented Mar 30, 2016

It works ok on my Windows machine, so I assume that it could either be something specific to Mac, or perhaps to the figure's renderer - try to set the figure and/or export_fig to other renderers and see if this helps.

@delyle
Copy link
Author

delyle commented Mar 30, 2016

The painters renderer works well, it's opengl that causes the issue.

@altmany
Copy link
Owner

altmany commented Mar 31, 2016

Please try to run print('test.png','-dpng') and see whether you see the same problem. In this case this would prove that this is an internal Matlab bug on Mac, and you should report it to MathWorks. Please report here what you find.

@delyle
Copy link
Author

delyle commented Mar 31, 2016

Running print('test.png','-dpng') gives the correct output, so I don't think it's an internal Matlab bug.

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