About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

scripts default iconFigure Pixel Resize Function (Scripts) Publisher's description

When presenting data, it is sometimes difficult to maximize the display of all of your plots and minimize the white space

When presenting data, it is sometimes difficult to maximize the display of all of your plots and minimize the white space. This is particularly evident when presenting multiple plots stacked on top of each other in a column. Matlab will, by default, place large amounts of white space between and around the plots. This resize function can eliminate that white space, or create more of it if desired.

From the help section,

% Resizes plot(s) by specified number of pixels
% Resizes either single plots or plots arranged in a column by number
% of specified pixels. Can be used as either a 'ResizeFcn' for a
% figure or as a direct call to resize a figure
% figure('ResizeFcn',{@pixel_resize,left,right,top,bottom,spacing,height})
% pixel_resize(notused,notused,left,right,top,bottom,spacing,height,fig_hand)
% notused - this argument is only necessary when calling pixel_resize
% as a function, and is not used in the function at all
% left - number of pixels to the left of the plot(s)
% right - number of pixels to the right of the plot(s)
% top - number of pixels above all of the plots
% bottom - number of pixels below all of the plots
% spacing - number of pixels between plots
% height - normalized height of each plot
% fig_hand - handle of figure to apply pixel_resize
% % define resize function for figure
% figure('ResizeFcn',{@pixel_resize,130,10,[],20,0,[0.5 0.25 0.25]})
% x = 0:.01:2*pi;
% y = sin(x);
% for i1 = 1:3
% subplot(3,1,i1)
% plot(x,y)
% end
% % use pixel_resize to resize a figure
% fig_hand = figure;
% x = 0:.01:2*pi;
% y = sin(x);
% for i1 = 1:3
% subplot(3,1,i1)
% plot(x,y)
% end
% % applies pixel_resize to gcf
% % pixel_resize(0,0,[],100,20,50,30)
% % applies pixel_resize to figure handle 'fig_hand'
% % pixel_resize(0,0,20,0,70,[],[],[0.2 0.6 0.2],fig_hand)
% if normalized spacing is desired, use an empty cell, '[]'
% if there is only 1 plot on the figure, the spacing option will not be
% needed and can either left out of the input arguments (see the
% 2nd syntax option), or left as empty, '[]'
% if pixel_resize is used as a function call, the first 2 arguments are
% not used at all, therefore, they can be anything
% if new spacing is desired, replot the figure and call pixel_resize
% with the new spacing options
% if the height is specified, its vector must add up to 1

% Version : 1.2 (10/17/2011)
% Author : Nate Jensen
% Created : 09/23/2011
% History :
% - v1.0 (09/23/2011) : initial release
% - v1.1 (10/03/2011) : added option to call pixel_resize outright
% - v1.2 (10/17/2011) : cleaned up code, added height option

System Requirements:

MATLAB 7.11 (2010b)
Program Release Status: New Release
Program Install Support: Install and Uninstall

Figure Pixel Resize Function (Scripts) Tags:

Click on a tag to find related softwares

Is Figure Pixel Resize Function (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.