% hurricane.m    P. Conrad for CISC106, Fall 2006   09/27/2006
 
% Demonstrate how to take hurricane data (similar to what we did in
% lab03 and lab04) and plot it _directly_ to the web.
%
% This eliminates the "extra steps" we had to do in lab03 and lab04,
% and puts those steps directly inside the M-file.
%
% This also makes it possible to do plots when you aren't on 
% the SunRays.
 

load alberto.dat;

wind = alberto(:,5);
pressure = alberto(:,6);

plot(wind,pressure);

xlabel('wind (mph)');
ylabel('pressure (millibars)');
legend('Tropical Storm Alberto');
title('Wind vs. Pressure in Tropical Storm Alberto, June 2006');

% Set up a web directory for our graphic

!mkdir -p -m 755 ~/public_html/cisc106/lab06

% Print the plot as a jpeg to the web

print -djpeg ~/public_html/cisc106/lab06/alberto.jpg

% Make the web files readable

!chmod -R a+rx ~/public_html/cisc106

% Or, I could have done:
%  !chmod -R 755 ~/public_html/cisc106

% Now the file should be available in 
%  http://copland.udel.edu/~username/cisc106/lect/09.27/alberto.jpg
%
% If this were a lab, you would put something like "lab06" in place
% of lect/09.26, e.g.
%
%  !mkdir -p -m 755 ~/public_html/cisc106/lab06/alberto.jpg
%  etc...
%  




