Exercise 2: Graphical Output Generation using Google Colab

Objective : What I want you to learn?

  • Visualizing the data using the Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy.

Rationale : Why this is useful to you?

  • Data visualization also makes it easier to detect patterns, and trends in the data, through which some kind of inference can be made.

  • Visualization of Aircraft Performance data will help in analyzing the parameters that affect the performance.

Learning Outcomes : What I want you to do after completing this topic?

  • Generate the Plots using the Matplotlib is a plotting library for the Python programming language

  • Appreciate the significance of plotting the data in the python programing using Google Colab

Introduction to Matplotlib: Visualization with Python

Matplotlib is one of the most popular Python packages used for data visualization. It is a cross-platform library for making 2D plots from data in arrays. Matplotlib is written in Python and makes use of NumPy, the numerical mathematics extension of Python. It can be used in Python and IPython shells, Jupyter notebook and web application servers also.

Matplotlib has a procedural interface named the Pylab, which is designed to resemble MATLAB, a proprietary programming language developed by MathWorks. Matplotlib along with NumPy can be considered as the open source equivalent of MATLAB. Matplotlib was originally written by John D. Hunter in 2003. The current stable version is 2.2.0 released in January 2018.

Example 1: Simple Line Plot

Example 2: Multiple Line Plot

Example 3: Sine and Cosine Plot

Example 4: Grid of Subplots

Example 5: Bar Chart

Example 6: Comparative Bar Chart

Example 7: Pie Chart

Assignment 2:

Question No 1:

Gulf Stream IV Twin Engine executive transport aircraft with the Total Takeoff Mass 33,000 kg, Wing Planform Area of 88 m2, with the Drag Polar of 0.015 + 0.08 CL2. Visually represent the variation of Thrust Required Variation with the Velocity using the Line Diagram.

Question No 2:

Gulf Stream IV Twin Engine executive transport aircraft with the Total Takeoff Mass 33,000 kg, Wing Planform Area of 88 m2, with the Drag Polar of 0.015 + 0.08 CL2. Customer requests to increase the Takeoff Mass to 35,000 kg from 33,000 kg. Visually represent the variation of Thrust Required Variation with the Velocity for 33,000 kg and 35,000 kg using the Multiple Line Diagram

Question No 3:

The Following is the Weight Summary of the Cessna 152 Aircraft in Pounds.

Wing = 216 Pounds, Empennage = 36 Pounds, Fuselage = 231 Pounds, Nacelle = 22 Pounds, Landing Gear = 104 Pounds, Engine = 197 Pounds, Others 60 Pounds.

Make a Pie Chart of the Weight Distribution in the Percentage

Materials for Further Studying and Reference Materials:

Ref 1: Matplotlib : Tutorials Point Learning Material

Ref 2: Matplotlib: - Exercises, Practice, Solution