|
|
Export figure
Hello everybody,
I have a figure with alot of axes, panels, buttons etc.
I've made it possible for the user to save the figure to file as an image through saveas or to print it with printdlg.
The problem is:
panels that have 'Visible' set to 'off' turn visible right before being printed and then get hidden again.
I also have alot of trouble adjusting the paperpositionmode etc.
What I want should be fairly simple:
Take the figure you see in front of you and print it to a file or paper exactly the way you see it (That which is hidden should remain hidden, size proportions should remain the same and colors should be intact), filling out a sheet in landscape mode. As simple as that.
I can't paste my code cause it's on a computer without internet access.
I hope someone can help me cause this is eating up my time.
Best regards Håkon
|
|
0
|
|
|
|
Reply
|
Håkon
|
11/23/2010 2:43:04 PM |
|
Here's our daily "How do I save my figure?" question.
See the FAQ:
http://matlab.wikia.com/wiki/FAQ#How_do_I_save_my_figure.2C_axes.2C_or_image.3F__I.27m_having_trouble_with_the_built_in_MATLAB_functions.
|
|
0
|
|
|
|
Reply
|
ImageAnalyst
|
11/23/2010 2:55:48 PM
|
|
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <3a33ed32-446f-41ae-93db-c1ec2c41c73b@l8g2000yqh.googlegroups.com>...
> Here's our daily "How do I save my figure?" question.
> See the FAQ:
>
> http://matlab.wikia.com/wiki/FAQ#How_do_I_save_my_figure.2C_axes.2C_or_image.3F__I.27m_having_trouble_with_the_built_in_MATLAB_functions.
Thanks for taking the time to answer.
I found out that setting the visibility of the panel to "off" was not enough. When printing, anything that has visible "on" will be displayed, although the parent panel has visible "off".
By changing this to set every single uicontrol's visibility mode to "off", saveas worked perfectly.
Printing to paper does however not resize properly, and it doesn't seem to matter how I adjust all the paperposition etc.
The only thing I accomplish is to get a java error with some of the combinations.
Is there a way to "print figure to a A4-sheet, auto-adjusting the scale of the figure so that the longest side will fit in the sheet and the shortest one keeps the same proportion regarding the longest side"?
Kind of like autoprinting the image I get when I use saveas, except that the possibility of choosing printer is there.
Thanks for all the help.
-Håkon
|
|
0
|
|
|
|
Reply
|
Håkon
|
11/24/2010 10:07:05 AM
|
|
Wow, glad I don't try to roll my own. Or are you saying that you
still had all these problems with export_fig?
|
|
0
|
|
|
|
Reply
|
ImageAnalyst
|
11/24/2010 2:28:58 PM
|
|
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <bbfdc7f6-37cd-4474-9337-05a9fae2fd3e@s4g2000yql.googlegroups.com>...
> Wow, glad I don't try to roll my own. Or are you saying that you
> still had all these problems with export_fig?
Hi,
I have only matlab2010b to work with and I'm not allowed /able to use anything from file_exchange.
The way I understood it, export_fig only saves figures, something I've manged myself with a fairly good result. The images I'm saving can also be used to print out and then they basically give me what I need.
Looks like I'm going to implement a way to choose a printer and then when the user chooses "print", what is actually happening is that a jpg is made and that the image is being printed.
Seems like printpreview (and print) offers no way of rescaling the figure in "print mode". Seems like height and width of the fiugre is "permanent" and the only way of getting all of it into one page is either a larger sheet or saving it as and image or something first.
|
|
0
|
|
|
|
Reply
|
Håkon
|
11/24/2010 3:22:04 PM
|
|
|
4 Replies
182 Views
(page loaded in 0.227 seconds)
|
|
|
|
|
|
|
|
|