function DataPlot(DataFolder,location,Name,X1, Y1,X2, Y2, X3, Y3, X4,Y4,X5,Y5)
%SUBFUNCTION OF readdata; Plots the importet SuperDarnRadar data for Radar "location", meridional wind
%  
%  Histogram before cleaning the Data
%  X1: Bin 
%  Y1: # Data in Bin
%
%  Averaged meridional wind vs. wind for the beam in meridional direction
%  before Cleaning
%  X2: Averaged meridional/ zonal wind (Vx/Vy) 
%  Y2: wind for the beam in meridional direction (Vm) / Variance Vy

%Histogram after cleaning the Data (throw away datapoints with wrong dates,
%STD =0 and averaged meridional wind >100m/s [see ThrowWrongTimesOut CleanData.m and FilterVx] 
%  X3: Bin 
%  Y3: # Data in Bin

%  Averaged meridional wind vs. wind for the beam in meridional direction
%  before Cleaning
%  X4: Averaged meridional/ zonal wind (Vx/Vy) 
%  Y4: wind for the beam in meridional direction (Vm) / Variance Vy

%Time series of the Cleaned Data
% X5 Time (yymmdd)
% Y5 Averaged meridional / zonal wind (Vx/Vy) 

%%
% Create figure
figure1 = figure('Name',location,'units','centimeters','Position',[0 0 21 25],...                    % setter str på figuren du vil se på skjermen. VIKIT Gat units kommer FØR Position
    'PaperUnits','centimeters','PaperPosition', [0 0 21 25],...% setter str på figuren du vil lagre (uavhengig av format) VIKITG at units kommer FØR Position
    'DefaultAxesFontSize',12,'DefaultAxesFontWeight','b');               %setter str på font i figure 

% Create axes
axes1 = axes('Parent',figure1,...
    'Position',[0.13 0.681730287859825 0.332431457431457 0.215735294117647]);
box(axes1,'on');
hold(axes1,'all');

% Create title
title(['Histogram ',location]);

% Create plot
plot(X1,Y1,'Marker','.','LineStyle','none','LineWidth',1,'Parent',axes1,...
    'Color',[0 0 0]);

% Create ylabel
ylabel('#');

% Create xlabel
xlabel('Bin');

%Axes limit
ylim([0,max(Y1)+20])
xlim([-0.5,30])

% Create axes
axes2 = axes('Parent',figure1,...
    'Position',[0.574309163059163 0.685484981226533 0.334659090909091 0.215735294117647]);

box(axes2,'on');
hold(axes2,'all');

% Create title
title(location);

% Create plot
plot(X2,Y2,'Marker','.','LineStyle','none','LineWidth',1,'Parent',axes2,'Color',[0 0 0]);

% Create xlabel
xlabel('averaged meridional wind [m/s] Vx');

% Create ylabel
ylabel('merional wind [m/s] Vm');

%Axes limit
xlim([min(X2),max(X2)])
ylim([min(Y2),max(Y2)])

% Create axes
axes3 = axes('Parent',figure1,...
    'Position',[0.13 0.365827596996245 0.332431457431457 0.215735294117647]);

box(axes3,'on');
hold(axes3,'all');

% Create title
title(['Histogram ',Name]);

% Create plot
plot(X3,Y3,'Marker','.','LineStyle','none','LineWidth',1,'Parent',axes3,'Color',[0 0 0]);

% Create ylabel
ylabel('#');

% Create xlabel
xlabel('Bin');

%Axes limit
set(gca,'xScale','log')
ylim([0,max(Y3)+20])
xlim([0,max(X3)])
% Create axes
axes4 = axes('Parent',figure1,...
    'Position',[0.575631914381914 0.364576032540676 0.332431457431458 0.215735294117647]);

box(axes4,'on');
hold(axes4,'all');

% Create title
title(Name);

% Create plot
plot(X4,Y4,'Marker','.','LineStyle','none','LineWidth',1,'Parent',axes4,'Color',[0 0 0]);

% Create xlabel
xlabel('averaged meridional wind [m/s] Vx');

% Create ylabel
ylabel('merional wind [m/s] Vm');

%Axes limit
xlim([min(X4),max(X4)])
ylim([min(Y4),max(Y4)])

% Create axes
axes5 = axes('Parent',figure1,...
    'Position',[0.131322751322751 0.0724530663329162 0.773439153439153 0.215735294117647]);

box(axes5,'on');
hold(axes5,'all');

% Create title
title(['Time series ',Name]);

% Create plot
plot(X5,Y5,'LineWidth',1,'Parent',axes5,'Color',[0 0 0]);
datetick('x','yymmdd');%,'keepticks');
% Create xlabel
xlabel('Day of Year [yymmdd]');

% Create ylabel
ylabel('Vx [m/s]');

%Axes limit
xlim([min(X5),max(X5)])
ylim([min(Y5),max(Y5)])

filename=[Name,'.fig'];
saveas(figure1,fullfile(DataFolder,location,[filename]))
end
