%%  This is an example of creating and plotting data.
%%  In this script we control the plot and its look 
%%  We demonstrate a few different ways to plot 2D data
clear;


%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%
figure(1)


%% create a grid from -1 to 1
[x,y] = meshgrid(linspace(1,-1,100),linspace(-1,1,100));

R = sqrt(x.^2 +y.^2);                           %% radius
G = sin(2*pi*x).*cos(2*pi*y).*(exp(-(R*2).^2)); %% function

contour(x,y,G,20) %% create contour plot

%% Set the axis and control the fonts
set(gca,'FontSize',12,'FontName','times')
xlabel('X')
ylabel('Y')



%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%
figure(2)
h = pcolor(x,y,G); %% create  plot
set(h,'LineStyle','none')

%% Set the axis and control the fonts
set(gca,'FontSize',12,'FontName','times')
xlabel('X')
ylabel('Y')

%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%
figure(3)
mesh(x,y,G);

%% Set the axis and control the fonts
set(gca,'FontSize',12,'FontName','times')
xlabel('X')
ylabel('Y')
zlabel('G(X,Y)')

