Graphing

From ECLR
Revision as of 19:19, 23 October 2015 by JL (talk | contribs) (Line Plots)
Jump to: navigation, search

Introduction

Line Plots

For this example we use one of Matlab's sample dataset to plot a simple line plot showing the time series movement of the stock market data. First Load the data.

load stockreturns

The data contains a (100x10) matrix of stock market observations and we are going to plot all of these data point on a single line plot using the 'plot' function.

figure
plot(stocks(:))

Lineplot1.png

sd=std(stocks(:);
hold on
plot(xlim, [sd sd],'--r')
plot(xlim, [-sd -sd],'--r')

Lineplot2.png

Scatter Diagrams

Histograms

Distribution Plots

Theoretical Distributions

Observed Distributions/Kernel Density Plots