(* Do not save output when exit from Mathematica *)
SetOptions[EvaluationNotebook[],NotebookEventActions -> {"WindowClose":> FrontEndExecute[FrontEndToken["DeleteGeneratedCells"]]}];

Data Visualization

Bar Chart

(* Simple Bar chart *)
BarChart[Range[5],         (* Data *)
ChartStyle -> Orange,  (* Color *)
ImageSize -> Small          (* Image Size *)
]

(* Change appearance of the graph using options *)
BarChart[Range[5],         (* Data *)
ChartElementFunction ->  "GlassRectangle" ,  (* Use 3D bars *)
ChartStyle->"Pastel"         (* Image Size *)
]

(* Add some labels *)

BarChart[Range[5], 
ChartLabels->{"one", "two", "three", "four", "five"},
ChartStyle->"DarkRainbow"]

(* Add Legends *)
BarChart[Range[5],
ChartStyle-> "Rainbow",  (* color each bar in different color *)
ChartLegends->{"one", "two","three","four","five"} (* place labels into the legend *)
]

(* Interactions *)
BarChart[{1,2,3,4, PopupWindow[5,"five"]}]

(* Compare Options with wrappers *)
BarChart[Range[5],
ChartStyle->Brown,
ChartLabels -> Placed[Range[5], Above]]

BarChart[
EventHandler[
{Labeled[1,"first"], 
Style[2,Red],
PopupWindow[3,"three"],
Tooltip[Style[4,Blue],"blue"]},
"MouseClicked":>(Speak[Round[MousePosition["Graphics"],0.1]])],
ImageSize->Small]

Histogram

(* Draw Simple Histogram *)
Histogram[RandomVariate[NormalDistribution[0,1],200]]

(* Generate data and then use it in histogram *)
data1=RandomVariate[NormalDistribution[0,1],500];
data2=RandomVariate[NormalDistribution[3,1/2],500];

Histogram[{data1,data2}]

(* Overlay several plots for Poisson distributions *)
Show[Histogram[Table[RandomInteger[PoissonDistribution[10 i],1000],
{i,5}],{1},"PDF",PlotRange->All],
Plot[Evaluate[Table[PDF[PoissonDistribution[10 mu],x],{mu,5}]],
{x,0,80},PlotStyle->Thick, PlotRange->All]]

BoxWhiskerChart

(* Generate data *)
data=Table[RandomVariate[NormalDistribution[RandomInteger[5],1],100],{2},{3}];

(* Plot data *)
BoxWhiskerChart[data,
ChartLegends->{"a","b","c"}]

DistributionChart

(* reuse the same data as in BoxWhiskerChart *)
DistributionChart[data,ChartLegends->{"a","b","c"}]

PieChart

PieChart[{{1,2,3},{2,2,1}}, 
ChartLabels->{"a","b","c"},
ChartLegends->{"a","b","c"}]

Buble Chart Example

(* simple buble chart example *)
BubbleChart[RandomReal[1,{5,7,3}]]

(* Generate the data *)
data=Table[{
country,
100 CountryData[country,"LiteracyFraction"],
CountryData[country,"LifeExpectancy"],
CountryData[country,"Population"],
CountryData[country,"Continent"]
},
{ country, CountryData[]}];

(* Plot a bubble Chart *)

BubbleChart[data[[All,{2,3,4}]]]

(* Add some options *)

BubbleChart[data[[All,{2,3,4}]],
ChartLabels -> Placed[data[[All,1]], Tooltip],
FrameLabel -> {"Literacy fraction", "Life expectancy"},
PlotLabel-> "Life Expectancy vs. Literacy Rate vs. Population"
]

(* we can split out data by continent *)
continentData=SplitBy[SortBy[data,Last],Last];
Length[continentData]

continents=Last[First[#]] &/@continentData

(* define a function *)
label[{country_,x_,y_,z_, continent_}]:=Tooltip[{x,y,z},country]

(* map our function to our dataset *)
splitdata=Map[label, continentData,{2}];

S
BubbleChart[splitdata,
FrameLabel -> {"Literacy fraction", "Life expectancy"},
PlotLabel-> "Life Expectancy vs. Literacy Rate vs. Population",
ChartLegends->continents
]