Changeset 2623


Ignore:
Timestamp:
11/06/09 14:55:14 (15 years ago)
Author:
Mathieu Morlighem
Message:

MUCH MUCH better printmodel (changed renderer, resolution, ...)

Location:
issm/trunk/src/m/classes/public
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/plot/applyoptions.m

    r2501 r2623  
    189189if exist(options,'axis')
    190190        eval(['axis ' getfieldvalue(options,'axis')]);
     191else
     192        axis tight equal;
    191193end
    192194
  • issm/trunk/src/m/classes/public/plot/plotmodel.m

    r2439 r2623  
    2323        figure(figurenumber),clf;
    2424
     25        %Use zbuffer renderer (snoother colors)
     26        set(gcf,'Renderer','zbuffer');
     27
    2528        %Go through all data plottable
    2629        for i=1:numberofplots,
  • issm/trunk/src/m/classes/public/printmodel.m

    r844 r2623  
    77%      printmodel(filename,format)
    88
    9 set(gcf,'Renderer','zbuffer'); %fixes a bug on Mac OS X (not needed in future Matlab version)
    10 frame=getframe();image=frame2im(frame);
    11 imwrite(image,filename,format);
     9%Get current figure
     10fig=gcf;
     11
     12%Set the PaperPositionMode property to auto before printing the figure.
     13%http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/f3-124745.html
     14set(fig, 'PaperPositionMode', 'auto');
     15
     16%Use higher resolution to anti-alias and use zbuffer to have smooth colors
     17print(fig, '-zbuffer', ['-r' num2str(get(0,'ScreenPixelsPerInch')*2)], ['-d' format],filename);
Note: See TracChangeset for help on using the changeset viewer.