Showing posts with label Data Visualization. Show all posts
Showing posts with label Data Visualization. Show all posts

Wednesday, January 20, 2021

Python for MBA's- Multiple bar charts using Python

 

import numpy as np

import matplotlib.pyplot as plt

Agricultureproduction = [[30255020],

[40235117],

[35224519]]

X = np.arange(4)

fig = plt.figure()

ax = fig.add_axes([0,0,1,1])

ax.bar(X + 0.00, Agricultureproduction[0], color = 'b', width = 0.25)

ax.bar(X + 0.25, Agricultureproduction[1], color = 'g', width = 0.25)

ax.bar(X + 0.50, Agricultureproduction[2], color = 'r', width = 0.25)


Python for MBA's- Barplot using Python

 

import numpy as np

import matplotlib.pyplot as plt

fig=plt.figure()

ax=fig.add_axes([0,0,1,1])

GDP=[8.2,8.4,7.2,6.5,8.5,9,9.2]

Year=['2010','2011','2012','2013','2014','2015','2016']

ax.bar(Year,GDP)

plt.show()


Friday, May 22, 2020

R for MBA's- Scatter plot or Scatter diagram


R for MBA's- Scatter plot or Scatter diagram

Problem 1:

Draw a scatter diagram for the given data set: 
> x<-c(212,245,278,351,324)
> y<-c(256,211,295,331,405)

> plot(x,y)









Thursday, May 21, 2020