Skip to content

PDF/EPS Export Crops Incorrectly When Using Black yyaxis #306

Description

@TCWORLD

When the yyaxis command is used, but the axes are set to be black rather than the default orange/blue, the exported PDF/EPS file is cropped wrong.

For example, the following code will result in the left hand axis label ('Up') not appearing in the PDF.

figure;
yyaxis('left');
plot(1:3,1:3);
ylabel('Up');
yyaxis('right');
plot(1:3,3:-1:1);
ylabel('Down');
ax = gca;
ax.YAxis(1).Color = 'k';
ax.YAxis(2).Color = 'k';

The problem is due to the issue of the black axis being the same colour as the temporary black background used in export of EPS or PDF files. The current method of fixing this only works for the last selected yyaxis, as setting 'YColor' property only affects that axis not both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions