0% found this document useful (0 votes)
38 views

Foundation of Data Science - CS3352 - Important Questions With Answer - Unit 5 - Data Visualization

Uploaded by

Saravanan DP
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Foundation of Data Science - CS3352 - Important Questions With Answer - Unit 5 - Data Visualization

Uploaded by

Saravanan DP
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Click on Subject/Paper under Semester to enter.

Environmental Sciences
Professional English and Sustainability -
Professional English - - II - HS3252 Discrete Mathematics GE3451
I - HS3152 - MA3354
Statistics and Theory of Computation
Matrices and Calculus Numerical Methods - Digital Principles and - CS3452
3rd Semester

4th Semester
- MA3151 MA3251 Computer Organization
1st Semester

2nd Semester

- CS3351 Artificial Intelligence


Engineering Graphics and Machine Learning
Engineering Physics - - CS3491
- GE3251 Foundation of Data
PH3151
Science - CS3352
Database Management
Physics for
Engineering Chemistry System - CS3492
Information Science Data Structure -
- CY3151 - PH3256 CS3301

Basic Electrical and


Algorithms - CS3401
Problem Solving and Electronics Engineering Object Oriented
Python Programming - - BE3251 Programming - CS3391 Introduction to
GE3151 Operating Systems -
Programming in C -
CS3451
CS3251

Computer Networks - Object Oriented


CS3591 Software Engineering
- CCS356
Compiler Design - Human Values and
5th Semester

CS3501 Embedded Systems Ethics - GE3791


7th Semester

8th Semester
6th Semester

and IoT - CS3691


Cryptography and Open Elective 2
Cyber Security - Open Elective-1 Project Work /
CB3491
Open Elective 3 Intership
Distributed Computing Elective-3
- CS3551 Open Elective 4
Elective-4
Elective 1
Management Elective
Elective-5
Elective 2
Elective-6
All Computer Engg Subjects - [ B.E., M.E., ] (Click on Subjects to
enter)
Programming in C Computer Networks Operating Systems
Programming and Data Programming and Data Problem Solving and Python
Structures I Structure II Programming
Database Management Systems Computer Architecture Analog and Digital
Communication
Design and Analysis of Microprocessors and Object Oriented Analysis
Algorithms Microcontrollers and Design
Software Engineering Discrete Mathematics Internet Programming
Theory of Computation Computer Graphics Distributed Systems
Mobile Computing Compiler Design Digital Signal Processing
Artificial Intelligence Software Testing Grid and Cloud Computing
Data Ware Housing and Data Cryptography and Resource Management
Mining Network Security Techniques
Service Oriented Architecture Embedded and Real Time Multi - Core Architectures
Systems and Programming
Probability and Queueing Theory Physics for Information Transforms and Partial
Science Differential Equations
Technical English Engineering Physics Engineering Chemistry
Engineering Graphics Total Quality Professional Ethics in
Management Engineering
Basic Electrical and Electronics Problem Solving and Environmental Science and
and Measurement Engineering Python Programming Engineering
www.BrainKart.com
4931_Grace College of Engineering, Thoothukudi

CS3352-FOUNDATIONS OF DATA SCIENCE


UNIT V
PART-A
1. What is Matplotlib?

Matplotlib is a Python 2D plotting library which produces publication quality figures in a


variety of hardcopy formats and interactive environments across platforms.

2. How do you install Matplotlib on a Windows system?

You can install Matplotlib on a Windows system by following the instructions here:
https://matplotlib.org/faq/installing_faq.html#windows.

3. What are some of the features provided by Matplotlib?

Matplotlib is a Python 2D plotting library which produces publication quality figures in a


variety of hardcopy formats and interactive environments across platforms. Matplotlib can be
used in Python scripts, the Python and IPython shell, web application servers, and six
graphical user interface toolkits.

4. Can you explain how to create and display a simple plot using matplotlib?

Sure. To create a plot using matplotlib, you will first need to import the matplotlib library.
Once you have imported matplotlib, you can use the plot() function to create a plot. The
plot() function takes two arguments: the data to be plotted, and the type of plot. For example,
to create a line plot, you would use plot(x, y, ‘-‘) where x and y are lists of data points. To
display the plot, you would use the show() function.

5. What is pylab in context with Matplotlib?

Pylab is a module that belongs to the Matplotlib library. It is used for creating two-
dimensional plots and graphs.

6. What is the difference between pyplot and pylab?

Pyplot is a module in matplotlib that provides a set of functions for creating and manipulating
plots. Pylab is a module that combines pyplot with numpy, providing a set of tools for
numerical calculations and plotting.

7. Why does PyLab use a stateful interface instead of an object-oriented


approach?

PyLab is designed to be a simple, concise interface to the powerful Matplotlib library. The
stateful interface is designed to make it easy to use Matplotlib without having to create a lot
of extra code or objects.

8. What’s the best way to draw multiple lines in a single figure?

CS3352_FDS

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 1 of 4
www.BrainKart.com
4931_Grace College of Engineering, Thoothukudi

The best way to draw multiple lines in a single figure is to use the plot() function. This
function can take multiple arguments, each of which will be plotted as a separate line. For
example, to plot two lines, you would use the following code:

plot(x1, y1, x2, y2)

9. What is the simplest way to add text annotations and labels to plots in
Python?

The simplest way to add text annotations and labels to plots in Python is to use the
matplotlib.pyplot.text() function. This function allows you to add text at any location on the
plot, and also allows you to specify the font size, style, and color of the text.

10. What is the significance of the “hold” command in Matplotlib?

The “hold” command is used to tell Matplotlib to keep all of the current plot elements on the
screen when adding new ones. This can be useful when you want to add multiple elements to
a plot and have them all appear at the same time. Without the “hold” command, each new
plot element would overwrite the previous one.

11. Is it possible to modify the tick label size for all plots in Matplotlib? If yes,
then how?

Yes, it is possible to modify the tick label size for all plots in Matplotlib. This can be done by
using the rcParams command.

12. Can you provide me examples of when a scatter graph would be more
appropriate than a line chart or vice versa?

A scatter graph would be more appropriate than a line chart when you are looking to show
the relationship between two variables that are not linearly related. For example, if you were
looking to show the relationship between a person’s age and their weight, a scatter graph
would be more appropriate than a line chart. A line chart would be more appropriate than a
scatter graph when you are looking to show a trend over time. For example, if you were
looking at the monthly sales of a company over the course of a year, a line chart would be
more appropriate than a scatter graph.

13. What is the best way to generate histograms in Matplotlib?

One way to generate histograms in Matplotlib is to use the pyplot.hist() function. This
function takes in an array of data and generates a histogram from it.

14. What is the usage of subplots in Matplotlib?

Subplots are used to plot multiple figures on one figure. This can be used to compare data
side by side or to show multiple views of the same data.

15. Why do we need customizing axes?

CS3352_FDS

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 2 of 4
www.BrainKart.com
4931_Grace College of Engineering, Thoothukudi

There are a few reasons why we might want to customize our axes. One reason is to make the
plot more readable or understandable. For example, if we are plotting data that spans a large
range, we might want to use a logarithmic scale to compress the data and make it easier to
interpret. Another reason to customize our axes is for aesthetic reasons. We might want to
change the color, line width, or tick marks to make our plot more visually appealing.

16. What is the purpose of using twinx() in Matplotlib?

The twinx() function in Matplotlib is used to create a second axes that shares the same x-axis
as the original axes. This is often used when you want to plot two different data sets on the
same plot, but with different y-axes.

17. What is your opinion about Matplotlib being a part of SciPy stack?

I believe that Matplotlib is a valuable part of the SciPy stack because it provides a powerful
and flexible platform for creating visualizations of data. It is also easy to use, which makes it
accessible to a wide range of users.

18. Where can I find good documentation for Matplotlib?

The Matplotlib website (matplotlib.org) has a comprehensive documentation section that


covers all aspects of the library in detail. The site also includes a number of examples that
show how to use Matplotlib in various ways. In addition, there are a number of books and
online tutorials that can be helpful in learning how to use Matplotlib.

19. What are some alternatives to Matplotlib?

Some alternatives to Matplotlib are Bokeh, Seaborn, and Plotly.

20. What are the various ways to handle exceptions while plotting graphs in
Matplotlib?

There are a few different ways to handle exceptions while plotting graphs in Matplotlib. One
way is to use a try/except block around your code. Another way is to use the Matplotlib built-
in function plt.errorbar(). This function will automatically plot error bars on your graph.

PART-B
1. Write python program to visualize the dataset using scatterplot and explain its
parameters.
2. Eloborate the error visualization metods in pyplot.
3. Explain different methods of showing 3D surface ib a 2D plane with example.
4. Demonstrate the usage of histograms for data exploration and explain its attributes.
5. Elaborate the concept of subplots and its applications.
6. Discuss in detail about the 3D plotting functions of matplotlib module.
7. Explain in detail about the functions of mpl_tool kit for Geographic data
visualization.

CS3352_FDS

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 3 of 4
Click on Subject/Paper under Semester to enter.
Professional English Discrete Mathematics Environmental Sciences
Professional English - - II - HS3252 - MA3354 and Sustainability -
I - HS3152 GE3451
Digital Principles and
Statistics and Probability and
Computer Organization
Matrices and Calculus Numerical Methods - Statistics - MA3391
- CS3351
- MA3151 MA3251
3rd Semester
1st Semester

4th Semester
2nd Semester

Database Design and Operating Systems -


Engineering Physics - Engineering Graphics
Management - AD3391 AL3452
PH3151 - GE3251

Physics for Design and Analysis of Machine Learning -


Engineering Chemistry Information Science Algorithms - AD3351 AL3451
- CY3151 - PH3256
Data Exploration and Fundamentals of Data
Basic Electrical and
Visualization - AD3301 Science and Analytics
Problem Solving and Electronics Engineering -
BE3251 - AD3491
Python Programming -
GE3151 Artificial Intelligence
Data Structures Computer Networks
- AL3391
Design - AD3251 - CS3591

Deep Learning -
AD3501

Embedded Systems
Data and Information Human Values and
and IoT - CS3691
5th Semester

Security - CW3551 Ethics - GE3791


6th Semester

7th Semester

8th Semester

Open Elective-1
Distributed Computing Open Elective 2
- CS3551 Project Work /
Elective-3
Open Elective 3 Intership
Big Data Analytics - Elective-4
CCS334 Open Elective 4
Elective-5
Elective 1 Management Elective
Elective-6
Elective 2
All Computer Engg Subjects - [ B.E., M.E., ] (Click on Subjects to enter)
Programming in C Computer Networks Operating Systems
Programming and Data Programming and Data Problem Solving and Python
Structures I Structure II Programming
Database Management Systems Computer Architecture Analog and Digital
Communication
Design and Analysis of Microprocessors and Object Oriented Analysis
Algorithms Microcontrollers and Design
Software Engineering Discrete Mathematics Internet Programming
Theory of Computation Computer Graphics Distributed Systems
Mobile Computing Compiler Design Digital Signal Processing
Artificial Intelligence Software Testing Grid and Cloud Computing
Data Ware Housing and Data Cryptography and Resource Management
Mining Network Security Techniques
Service Oriented Architecture Embedded and Real Time Multi - Core Architectures
Systems and Programming
Probability and Queueing Theory Physics for Information Transforms and Partial
Science Differential Equations
Technical English Engineering Physics Engineering Chemistry
Engineering Graphics Total Quality Professional Ethics in
Management Engineering
Basic Electrical and Electronics Problem Solving and Environmental Science and
and Measurement Engineering Python Programming Engineering
Click on Subject/Paper under Semester to enter.
Environmental Sciences
Professional English and Sustainability -
Professional English - - II - HS3252 Discrete Mathematics GE3451
I - HS3152 - MA3354
Statistics and Theory of Computation
Matrices and Calculus Numerical Methods - Digital Principles and - CS3452
3rd Semester

4th Semester
- MA3151 MA3251 Computer Organization
1st Semester

2nd Semester

- CS3351 Artificial Intelligence


Engineering Graphics and Machine Learning
Engineering Physics - - CS3491
- GE3251 Foundation of Data
PH3151
Science - CS3352
Database Management
Physics for
Engineering Chemistry System - CS3492
Information Science Data Structure -
- CY3151 - PH3256 CS3301

Basic Electrical and


Algorithms - CS3401
Problem Solving and Electronics Engineering Object Oriented
Python Programming - - BE3251 Programming - CS3391 Introduction to
GE3151 Operating Systems -
Programming in C -
CS3451
CS3251

Computer Networks - Object Oriented


CS3591 Software Engineering
- CCS356
Compiler Design - Human Values and
5th Semester

CS3501 Embedded Systems Ethics - GE3791


7th Semester

8th Semester
6th Semester

and IoT - CS3691


Cryptography and Open Elective 2
Cyber Security - Open Elective-1 Project Work /
CB3491
Open Elective 3 Intership
Distributed Computing Elective-3
- CS3551 Open Elective 4
Elective-4
Elective 1
Management Elective
Elective-5
Elective 2
Elective-6
All Computer Engg Subjects - [ B.E., M.E., ] (Click on Subjects to
enter)
Programming in C Computer Networks Operating Systems
Programming and Data Programming and Data Problem Solving and Python
Structures I Structure II Programming
Database Management Systems Computer Architecture Analog and Digital
Communication
Design and Analysis of Microprocessors and Object Oriented Analysis
Algorithms Microcontrollers and Design
Software Engineering Discrete Mathematics Internet Programming
Theory of Computation Computer Graphics Distributed Systems
Mobile Computing Compiler Design Digital Signal Processing
Artificial Intelligence Software Testing Grid and Cloud Computing
Data Ware Housing and Data Cryptography and Resource Management
Mining Network Security Techniques
Service Oriented Architecture Embedded and Real Time Multi - Core Architectures
Systems and Programming
Probability and Queueing Theory Physics for Information Transforms and Partial
Science Differential Equations
Technical English Engineering Physics Engineering Chemistry
Engineering Graphics Total Quality Professional Ethics in
Management Engineering
Basic Electrical and Electronics Problem Solving and Environmental Science and
and Measurement Engineering Python Programming Engineering
Click on Subject/Paper under Semester to enter.
Environmental Sciences
Professional English and Sustainability -
Professional English - - II - HS3252 Discrete Mathematics - GE3451
I - HS3152 MA3354
Statistics and Theory of Computation
Matrices and Calculus Numerical Methods - Digital Principles and - CS3452
3rd Semester

4th Semester
- MA3151 MA3251 Computer Organization
1st Semester

2nd Semester

- CS3351 Artificial Intelligence


Engineering Graphics and Machine Learning
Engineering Physics - - CS3491
- GE3251 Foundation of Data
PH3151
Science - CS3352
Database Management
Physics for
Engineering Chemistry System - CS3492
Information Science Data Structures and
- CY3151 - PH3256 Algorithms - CD3291
Web Essentials -
Basic Electrical and IT3401
Problem Solving and Electronics Engineering - Object Oriented
Python Programming - BE3251 Programming - CS3391 Introduction to
GE3151 Operating Systems -
Programming in C -
CS3451
CS3251

Computer Networks -
CS3591
Object Oriented
Full Stack Web Software Engineering - Human Values and
5th Semester

Development - IT3501 CCS356 Ethics - GE3791


7th Semester

8th Semester
6th Semester

Distributed Computing Open Elective-1 Open Elective 2


- CS3551 Project Work /
Elective-3 Open Elective 3 Intership
Embedded Systems and
IoT - CS3691 Elective-4
Open Elective 4

Elective 1 Elective-5
Management Elective

Elective-6
Elective 2
All Computer Engg Subjects - [ B.E., M.E., ] (Click on Subjects to enter)
Programming in C Computer Networks Operating Systems
Programming and Data Programming and Data Problem Solving and Python
Structures I Structure II Programming
Database Management Systems Computer Architecture Analog and Digital
Communication
Design and Analysis of Microprocessors and Object Oriented Analysis
Algorithms Microcontrollers and Design
Software Engineering Discrete Mathematics Internet Programming
Theory of Computation Computer Graphics Distributed Systems
Mobile Computing Compiler Design Digital Signal Processing
Artificial Intelligence Software Testing Grid and Cloud Computing
Data Ware Housing and Data Cryptography and Resource Management
Mining Network Security Techniques
Service Oriented Architecture Embedded and Real Time Multi - Core Architectures
Systems and Programming
Probability and Queueing Theory Physics for Information Transforms and Partial
Science Differential Equations
Technical English Engineering Physics Engineering Chemistry
Engineering Graphics Total Quality Professional Ethics in
Management Engineering
Basic Electrical and Electronics Problem Solving and Environmental Science and
and Measurement Engineering Python Programming Engineering

You might also like