Changes between Version 3 and Version 4 of FAQ_MatlabPlots


Ignore:
Timestamp:
06/03/08 04:22:53 (6 years ago)
Author:
dkearney
Comment:

updated matlab pic faq to include visible property of figures

Legend:

Unmodified
Added
Removed
Modified
  • FAQ_MatlabPlots

    v3 v4  
    2424}}} 
    2525 
    26 Once you have a png file, you will need to put it into the your Rappture Library. 
     26In Matlab, it is suggested that you avoid using the ''-nodisplay'' flag when 
     27dealing with graphics and use the ''-nojvm -nosplash'' command line combination. 
     28The ''-nodisplay'' command line flag will prevent the figure from being displayed, 
     29but also encourages Matlab to segfault and hand you back massive traceback. 
     30The ''-nojvm -nosplash'' command line flag combination does a good enough job at 
     31keeping graphical user interfaces from popping up. Additionally you can set 
     32the figure's '''visibile''' property to '''off''' as shown in the example below. 
     33A more Matlab-centric example follows: 
     34 
     35{{{ 
     36fname='tst.jpg'; 
     37 
     38% create our figure 
     39fff=peaks(20); 
     40mesh(fff); 
     41 
     42% turn off the visibility of the current figure 
     43set(gcf,'Visible','off'); 
     44 
     45% save the current figure to fname 
     46saveas(gcf,fname); 
     47 
     48% close the current figure 
     49close(gcf); 
     50}}} 
     51 
     52Once you have a png or jpg file, you will need to put it into the your Rappture Library. 
    2753using the [wiki:rappture_matlab_api rpLibPutFile] function. The 
    2854[wiki:rappture_matlab_api rpLibPutFile] command will automatically compress and