Closed paulbarron85 closed 6 months ago
I cannot reproduce the problem using the code snippet below, which is supposedly equivalent to your code (the code that you uploaded is not runnable as-is):
figure; hold on;
yyaxis right; h1=plot(1:5);
yyaxis left; h2=plot(20:40);
hold off;
legend([h1,h2],'right','left');
drawnow; pause(1); % render the figure
export_fig test.eps; winopen test.eps
Perhaps the problem is that in your yyaxis right
code branch you are using plotyy
instead of plot
. In this case it's not a problem of export_fig but a bug in your code.
If the problem persists, then please reopen this issue and upload a reproducible runnable code snippet.
I'm trying to create a figure where I use yyaxis right and yyaxis left. When I try to export figure there's nothing in the image, just white space. If I comment out yyaxis left and yyaxis right then export_fig works correctly.