Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Changing the save button in figure windows

Subject: Changing the save button in figure windows

From: Maxx Chatsko

Date: 6 Jul, 2010 13:23:06

Message: 1 of 4

Hello all,
    Not sure if this is possible, but I was wondering if I can change what the save button does in the top of a plot figure (GUI). My parent function displays different plots in separate figure windows depending on USER inputs. It seems that MATLAB automatically assigns a menu bar to each plot. So, when you click 'Save' it saves the figure as a .fig file. I need to save it as a .spc, which requires another function to convert the image data into this filetype. Right now I just added a note and a 'Save spectra as .spc' pushbutton that executes the function that converts the image to .spc. It works, its just not the most user-friendly in my opinion. I'm using guide, which may be the problem? Any quick uicontrol fixes for this minor dilemna?
       Thanks
       Maxx

Subject: Changing the save button in figure windows

From: Yair Altman

Date: 6 Jul, 2010 18:11:12

Message: 2 of 4

> Not sure if this is possible, but I was wondering if I can change what the save button does in the top of a plot figure (GUI).

Of course: http://undocumentedmatlab.com/blog/modifying-default-toolbar-menubar-actions/

Yair Altman
http://UndocumentedMatlab.com

Subject: Changing the save button in figure windows

From: Maxx Chatsko

Date: 6 Jul, 2010 19:04:20

Message: 3 of 4

> Yair Altman
> http://UndocumentedMatlab.com

> Of course: http://undocumentedmatlab.com/blog/modifying-default-toolbar-menubar-actions/

   Thanks Yair Altman! I should've checked your website earlier (I use it a lot).
                          Maxx

Subject: Changing the save button in figure windows

From: Maxx Chatsko

Date: 9 Jul, 2010 20:18:06

Message: 4 of 4

> Of course: http://undocumentedmatlab.com/blog/modifying-default-toolbar-menubar-actions/
>
> Yair Altman
> http://UndocumentedMatlab.com

      So I have a function that converts data from a .tif image to a .spc image. How can I change how Matlab saves files (to execute my program) and add .spc to the 'Extension type' list?
      Thanks
      Maxx

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us