top of page
Aw Joey's Site
Always ready to learn more...
Week 4-
Using Anaconda for Charts & Machine Learning
Lab 4-1: Introduction to Data Science
Displaying Simple Line Charts
Using python to display simple line charts is very interesting. From this exercise, I learned how to add titles, labels, new lines, and legends and customize plots with stylesheets.
​
This can be implemented in a program to tabulate the derived data and display a simple line chart.
​
​
Fibonacci Sequence Chart
Applying the information learnt from the above exercise with Programming learned in last semester, I was able to kill two birds with one stone. I am able to fully understand how to create a line chart and recap on last semester's Programming module.
Displaying Simple Bar Charts
Similar to the above exercise on simple line charts, I learned how to add new charts and change the x-axis label for simple bar charts.
​
After some research on the use of alpha for bar charts, I found that alpha is used for adjusting the transparency of the graph plot. The given graph sets its alpha as 0.5 in order to see the gridlines.
​
Such charts are good for comparing data between many objects, and can also be implemented in another program to show the comparison between the objects.
​
Displaying Pie Charts
The code for pie charts is a bit different from bar and line charts. It does not consist of any axis as plt.axis("equal") is used. Furthermore,
angles are used instead as it is a circle.
This is good for comparing the percentages of different objects, in this case being the operating systems used.
​
In my opinion, this is a little harder to do as compared to the line and bar charts.
Displaying Scatter Plots
Scatter plots are very easy to do as the only variables needed are the coordinates of each point and the minimum and maximum values of both axis.
Combining Scatter Plots
It is interesting as I learned that different shapes can be created for each plotted point.
e.g. ^ for triangle, -- for dash
bottom of page