Data: 11/07/2024
Having just completed the abstract submission for ISMRM 2025, I found myself spending a lot of time perfecting the figures. To save time next year and help others in a similar position, I thought it would be helpful to compile some tips on creating clear, effective figures for ISMRM submissions or publications.
To start, it's important to understand the differences between common image formats. ISMRM allows images to be submitted in PNG or JPEG formats, with GIF permitted for animated display. While I'm not an expert on the topic, the key point is that JPEG uses lossy compression, meaning it reduces file size by discarding some image data, whereas PNG is a lossless format that retain all image details. Since JPEG files are typically smaller, they're ideal for meeting ISMRM's 2MB file size limit, making JPEG my go-to choice.
Returning to MATLAB. As for figure creating, two commonlly-used functions are: plot & imshow. You can save these figures manually or automate the process with the print function. However, the default properties for both plot & imshow aren't typically optimized for publication-quality images. MATLAB offers a variety of customization options through Axes Properties and Figure Properties, which can be adjusted with the set using axie handle gca and figure handle gcf.
For example, if you want to set the font size to 16 and line weight to 2 for the axis, you can use the command: set(gca, 'FontSize', 16, 'LineWeight', 2)
. If you
need an exact figure size without resizing it in other software, use: set(gcf, 'Position', [10, 10, 500, 1000])
,
where Position property is a vector [left, bottom, width, height]
(refer to Figure Properties for more details). For a black background, you can set: set(gcf, 'Color', 'k')
.
Additionally, nexttile function is a good alternative to the subplot function because it can control the subplot spacing. A general usage example would look like:
figre(1) t = tiledlayout(2,2, 'TileSpacing', 'compact') nexttile, plot(x1, y1); nexttile, plot(x2, y2); nexttile, plot(x3, y3); nexttile, plot(x4, y4);
For the function imshow, a helpful setting is imshow(abs(YourImage), [], 'border', 'tight')
, which removing unnecessary margins around the saved images, saving time on
cropping. The montage function is also useful, allowing you to combine images of different sizes into a single display. I often use it to combine a series of images and their zoomed-in details.
Regarding GIF creating, I wrote a function to create GIF format:
function saveGIF(im3d, framerate, dir) % write the mat file to GIF format % Only support 3D images % input: % im3d : size = [width, hight, time]. % framerate: expected frame rate of created GIF. % dir : ../../XXX.gif. im3d = abs(im3d); for i = 1:size(im3d,3) [A, map] = gray2ind(im3d(:,:,i), 256); if i == 1 imwrite(A, map, dir, "gif", "LoopCount", Inf, "DelayTime", framerate); else imwrite(A, map, dir, "gif", "WriteMode", "append", "DelayTime", framerate); end end
You can edit GIF using ezgif, a clean, and efficient website for GIF editing.
© 2024 wrr6ps