MATLAB [1] uses the default resolution of 150dpi for the plots. However, the high resolution MATLAB plot can be achieved through its inbuilt functions and resolution option (-r). This can be valuable for high quality plot for research papers and also to display it on Case Viz-Wall to see the intricate details that might have been missed using low resolution single monitor. The trade-off is that file size gets larger with higher resolution values. Also, there is a limit for the value of resolution.
There are three easy steps:
Create a plot
Capture a plot
Save it in image format applying the resolution values
Create a plot using MATLAB functions plot, surf
e.g.
surf(...)
plot(...)
Use the function Get Current Figure (gcf) and set the position and size of the image. Size will be in centimeter so change it to inch.
e.g.
set(gcf, 'PaperPosition', [0, 0, <width> / 2.54, <height> / 2.54])
Save (print) the image assigning the higher values of resolution than the default value of 150dpi. Choose the image format using -d option; -dtiff impiles TIFF format & -dpng is PNG format.
e.g.
print -d<img-format> -r<res_value> <file-name>
Note: If you have selected the width x width = 16X12 and res_value = 1000, then the size of the file will be 16/2.54*1000 x 12/2.54*1000 ~ 6300 x 4725 pixels (or dots)
Login to viz node (e.g. hpcviz) using OpenNX (Refer HPC Visual Access)
Open Interactive MATLB session
Create a new MATALB script (e.g. contour_highres.m) file and copy the content below:
th = (0:5:360)*pi/180;
r = 0:.05:1;
[TH,R] = meshgrid(th,r);
[X,Y] = pol2cart(TH,R);
Z = X + 1i*Y;
f = (Z.^4-1).^(1/4);
figure
surf(X,Y,abs(f))
colormap summer
%Get Current Figure (GCF) & Set image size before saving image
width = 16; % cm
height = 12; % cm
set(gcf, 'PaperPosition', [0, 0, width / 2.54, height / 2.54])
%Set the resolution of 1000dpi and save the plot in TIFF format
print -dpng -r1000 contour_16x12x1000
Execute the script
Save the default MATLAB plot in some image format and compare the resolution with contour_16x12x1000.tiff. Email its <hypehen> viz <hyphen> admin AT case.edu if you want to visualize it in high resolution Case Viz-Wall.
The aim is to produce high resolution graphs and images with less effort.
To open the general PDF file :
evince <PDF-file>
Open a new file with appropriate size in Adobe Illustrator. Choose the graph tool on the left toolbox panel. By clicking and holding the small arrow on its bottom right , choose the appropriate graph.
Holding on the left mouse button, move the mouse to cover the canvass and once you have the appropriate size, release the button. You can see the table.
Copy and Paste the data from the Excel sheet in appropriate columns and then click on Apply button (check mark). You can see the graph. You can select the appropriate legends and colors (see the references).
Save the graph as Illustrator file.
Open the file in Adobe Photoshop
Click on image menu and set appropriate size and resolution
Click on the Filter menu -> Sharpen -> Smart Sharpen ...
Save the image as appropriate format such as PNG, JPEG etc
Open the image file in Adobe Photoshop. You may be able to select the appropriate colors (see the references)
Click on image menu and set appropriate size and resolution
Click on the Filter menu -> Sharpen -> Smart Sharpen ...
Save the image as appropriate format such as PNG, JPEG etc
For very high resolution scientific images and videos, use the software such as Visit & Paraview.
Refer to HPC Visualization Software Guide.
References
[1] MATLAB Home: http://www.mathworks.com/