Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
1 views

Mastering Matplotlib With Python For Developers Effective Techniques For Data Visualization With Python Melendez pdf download

The document is a comprehensive guide titled 'Mastering Matplotlib With Python For Developers,' focusing on effective data visualization techniques using the Matplotlib library in Python. It covers installation, various types of plots (line, bar, histogram, scatter, pie, and 3D plots), and customization options for visualizations. Additionally, it provides practical examples and code snippets for implementing these techniques in Python programming.

Uploaded by

ilzobrzan47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Mastering Matplotlib With Python For Developers Effective Techniques For Data Visualization With Python Melendez pdf download

The document is a comprehensive guide titled 'Mastering Matplotlib With Python For Developers,' focusing on effective data visualization techniques using the Matplotlib library in Python. It covers installation, various types of plots (line, bar, histogram, scatter, pie, and 3D plots), and customization options for visualizations. Additionally, it provides practical examples and code snippets for implementing these techniques in Python programming.

Uploaded by

ilzobrzan47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

Mastering Matplotlib With Python For Developers

Effective Techniques For Data Visualization With


Python Melendez download

https://ebookbell.com/product/mastering-matplotlib-with-python-
for-developers-effective-techniques-for-data-visualization-with-
python-melendez-58304706

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Mastering Opencv With Python Use Numpy Scikit Tensorflow And


Matplotlib To Learn Advanced Algorithms For Machine Learning Through A
Set Of Practical Projects Ayush Vaishya

https://ebookbell.com/product/mastering-opencv-with-python-use-numpy-
scikit-tensorflow-and-matplotlib-to-learn-advanced-algorithms-for-
machine-learning-through-a-set-of-practical-projects-ayush-
vaishya-53747356

Mastering Data Analysis With Python A Comprehensive Guide To Numpy


Pandas And Matplotlib Rajender Kumar

https://ebookbell.com/product/mastering-data-analysis-with-python-a-
comprehensive-guide-to-numpy-pandas-and-matplotlib-rajender-
kumar-48372746

Mastering Data Analysis With Python A Comprehensive Guide To Numpy


Pandas And Matplotlib Rajender Kumar

https://ebookbell.com/product/mastering-data-analysis-with-python-a-
comprehensive-guide-to-numpy-pandas-and-matplotlib-rajender-
kumar-49437538

Mastering Matplotlib Duncan M Mcgreggor

https://ebookbell.com/product/mastering-matplotlib-duncan-m-
mcgreggor-42932608
Mastering Collaboration In A Product Team 70 Techniques To Help Teams
Build Better Products 1st Edition Natasha Hampshire Glaudia Califano
David Spinks

https://ebookbell.com/product/mastering-collaboration-in-a-product-
team-70-techniques-to-help-teams-build-better-products-1st-edition-
natasha-hampshire-glaudia-califano-david-spinks-44875474

Mastering Collaboration In A Product Team 70 Techniques To Help Teams


Build Better Products 1st Edition Natasha Hampshire

https://ebookbell.com/product/mastering-collaboration-in-a-product-
team-70-techniques-to-help-teams-build-better-products-1st-edition-
natasha-hampshire-44915468

Mastering Gnome A Beginners Guide 1st Edition Sufyan Bin Uzayr

https://ebookbell.com/product/mastering-gnome-a-beginners-guide-1st-
edition-sufyan-bin-uzayr-46082774

Mastering Flutter A Beginners Guide 1st Edition Sufyan Bin Uzayr

https://ebookbell.com/product/mastering-flutter-a-beginners-guide-1st-
edition-sufyan-bin-uzayr-46082778

Mastering Rust A Beginners Guide 1st Edition Sufyan Bin Uzayr

https://ebookbell.com/product/mastering-rust-a-beginners-guide-1st-
edition-sufyan-bin-uzayr-46151622
About the Authors
Jenna G Melendez is currently a professional software developer. After spending
almost a decade working as a teacher in a prestigious school in his hometown, he
decides to devote herself to his greatest passion, programming. Having dedicated
his initial working life to teaching, he decided, in addition to teaching through
private courses, to write some programming books for beginners. If you want to
know more about programming and machine learning I can help you.

Table of Contents
Contents
About the Authors
Table of Contents
Mastering Matplotlib with Python for Developers
PART 1: Introduction
Chapter 1: Environment Setup for Matplotlib
Setting up
Chapter 2: Introduction to Matplotlib
Importing matplotlib
Basic plots in Matplotlib
Line plot using Matplotlib
Bar plot using Matplotlib
Histogram using Matplotlib
Scatter Plot using Matplotlib
Chapter 3: Python Matplotlib – An Overview
Installation
Basics
Plotting Bar Graph
Chapter 4: Using Matplotlib with Jupyter Notebook
Using Matplotlib with Jupyter Notebook
Chapter 5: Pyplot in Matplotlib
Installing Matplotlib
What is Pyplot in Matplotlib?
Plotting in Matplotlib
Pyplot Examples
Example 1: Linear Plot using matplotlib.pyplot
Example 2: Linear Plot with line formatting
Chapter 6: Matplotlib – Axes Class
Axes class
axes() function
add_axes() function
ax.legend() function
ax.plot() function
PART 2: Multiple Plots
Chapter 1: Multiplots in Python using Matplotlib
Python3
Python3
Python3
Python3
Chapter 2: Create multiple subplots in Matplotlib in Python
Chapter 3: Add Title to Subplots in Matplotlib
Steps Needed
Chapter 4: Set a Single Main Title for All the Subplots in Matplotlib
Setting a Single Title for All the Subplots
Example 1:
Python3
Example 2:
Python3
Chapter 5: Create Different Subplot Sizes in Matplotlib
Create Different Subplot Sizes in Matplotlib using Gridspec
Create Different Subplot Sizes in Matplotlib gridspec_kw
Create Different Subplot Sizes in Matplotlib subplot2grid
Chapter 6: Set the spacing between subplots in Matplotlib in Python
Set the spacing between subplots
Steps Needed
Using tight_layout() method to set the spacing between subplots
Using subplots_adjust() method to set the spacing between subplots
Using subplots_tool() method to set the spacing between subplots
Using constrained_layout() to set the spacing between subplots
PART 3: Line Graph
Chapter 1: Line chart in Matplotlib
Simple line plots
Multiple charts
Multiple plots on the same axis
Fill the area between two plots
Chapter 2: Line plot styles in Matplotlib
Chapter 3: Plot Multiple lines in Matplotlib
Plotting a single Horizontal Line
Plotting a single Vertical Line
Plotting a Horizontal and a Vertical Line
Plotting Multiple Lines
Plotting Multiple Lines with different Line styles
Chapter 4: Plot line graph from NumPy array
Python3
Python3
PART 4: Bar Chart
Chapter 1: Bar Plot in Matplotlib
Creating a bar plot
Multiple bar plots
Stacked bar plot
Chapter 2: Create a stacked bar plot in Matplotlib
Chapter 3: Stacked Percentage Bar Plot In MatPlotLib
Chapter 4: Plotting back-to-back bar charts Matplotlib
Steps Needed
PART 5: Histogram
Chapter 1: Plotting Histogram in Python using Matplotlib
Creating a Histogram
Customization of Histogram
Chapter 2: Create a cumulative histogram in Matplotlib
Chapter 3: Plot two histograms together in Matplotlib
How to plot a histogram using Matplotlib
Syntax of matplotlib.pyplot.hist
Chapter 4: Overlapping Histograms with Matplotlib in Python
Chapter 5: Bin Size in Matplotlib Histogram
Method 1 :
Method 2 :
Method 3:
Chapter 6: Compute the histogram of a set of data using NumPy in Python
PART 6: Scatter Plot
Chapter 1: matplotlib.pyplot.scatter() in Python
matplotlib.pyplot.scatter()
Python3
Python3
Chapter 2: Add a legend to a scatter plot in Matplotlib
Python3
Python3
Python3
Python3
Chapter 3: Connect Scatterplot Points With Line in Matplotlib
Chapter 4: Create a Scatter Plot with several colors in Matplotlib
Using the parameter marker color to create a Scatter Plot
Using the colormap to create a Scatter Plot
Chapter 5: Increase the size of scatter points in Matplotlib
Approach
PART 7: Pie Chart
Chapter 1: Plot a pie chart in Python using Matplotlib
Creating Pie Chart
Python3
Customizing Pie Chart
Python3
Python3
Chapter 2: Set border for wedges in Matplotlib pie chart
Chapter 3: Radially displace pie chart wedge in Matplotlib
PART 8: 3D Plots
Chapter 1: Three-dimensional Plotting in Python using Matplotlib
Example Of Three-dimensional Plotting using Matplotlib
3-Dimensional Line Graph Using Matplotlib
3-Dimensional Scattered Graph Using Matplotlib
Surface Graphs using Matplotlib library
Wireframes graph using Matplotlib library
Contour Graphs using Matplotlib library
Plotting Surface Triangulations In Python
Plotting Möbius strip In Python
Chapter 2: 3D Scatter Plotting in Python using Matplotlib
Chapter 3: 3D Surface plotting in Python using Matplotlib
Creating 3D surface Plot
Gradient surface Plot
3D surface Plot having 2D contour plot projections
Chapter 4: 3D Wireframe plotting in Python using Matplotlib
Chapter 5: 3D Contour Plotting in Python using Matplotlib
Chapter 6: Tri-Surface Plot in Python using Matplotlib
Chapter 7: Surface plots and Contour plots in Python
Surface plots
Creating 3D surface Plot
Countour plots
Creating Contour plots
Chapter 8: Change angle of 3D plot in Python
PART 9: Working with Images
Chapter 1: Working with Images in Python using Matplotlib
Working with Images in Python using Matplotlib
Chapter 2: Working with PNG Images using Matplotlib
PART 10: Customizing Plots
Chapter 1: Style Plots using Matplotlib
Chapter 2: Change plot size in Matplotlib – Python
Chapter 3: Change the Transparency of a Graph Plot in Matplotlib with Python
Below are some examples which depict how to change the
transparency of a Graph Plot using matplotlib library
Chapter 4: Change the Color of a Graph Plot in Matplotlib with Python
Chapter 5: Change Fonts in matplotlib
Chapter 6: Set Plot Background Color in Matplotlib
Setting Outer and Inner color of plot
Chapter 7: Add text to Matplotlib
Chapter 8: Change Matplotlib color bar size in Python

Mastering Matplotlib with


Python for Developers
PART 1: Introduction
Chapter 1: Environment Setup
for Matplotlib
Matplotlib is an overall package for creating static, animated, and
interactive visualizations in Python. It literally opens up a whole new
world of possibilities for you! Especially when it is used
with Numpy or Pandas library, one can do unimaginable things. The
plots give may give a new insight altogether. Now, the question
arises i.e. How to make it running on your computer? But a more
primary question would be, what are its pre-requisites or as we call
it, dependencies for the software to run on your computer?
Dependencies

Python (>= 3.6)


FreeType (>= 2.3)
libpng (>= 1.2)
NumPy (>= 1.11)
setuptools
cycler (>= 0.10.0)
dateutil (>= 2.1)
kiwisolver (>= 1.0.0)
pyparsing

We’re ready to get the Matplotlib on our system!

Setting up
On macOS

Install libpng and Freetype using brew:

brew install libpng freetype pkg-config


In case you’re working on MacPorts, execute the following
instead:

port install libpng freetype pkgconfig

Now install matplotlib from the source using:

python -mpip install

On Linux

It’s the easiest to get it on Ubuntu since you can get all the
dependencies by simply using the following command:
sudo apt-get build-dep python-matplotlib
Chapter 2: Introduction to
Matplotlib
Matplotlib is an amazing visualization library in Python for 2D plots
of arrays. Matplotlib is a multi-platform data visualization library built
on NumPy arrays and designed to work with the broader SciPy stack.
It was introduced by John Hunter in the year 2002. One of the
greatest benefits of visualization is that it allows us visual access to
huge amounts of data in easily digestible visuals. Matplotlib consists
of several plots like line, bar, scatter, histogram etc.
Installation: Windows, Linux and macOS distributions have
matplotlib and most of its dependencies as wheel packages. Run the
following command to install matplotlib package. But before that
make sure Python and PIP are already installed on a system :
To install pip you can refer to this article : Python PIP
After checking Python and PIP in your system, You need to run this
command to install Matplotlib.
python -mpip install -U matplotlib

Importing matplotlib
After successfully installing matplotlib , You can run this command to
import matplotlib on your system.
Import matplotlib

Basic plots in Matplotlib


Matplotlib comes with a wide variety of plots. Plots help to
understand trends, and patterns, and to make correlations. They’re
typically instruments for reasoning about quantitative information.
Some of the sample plots are covered here.

Line plot using Matplotlib


By importing the matplotlib module, defines x and y values for a
plots, plots the data using the plot() function and it helps to display
the plot by using the show() function . The plot() creates a line plot
by connecting the points defined by x and y values.

Python3

# importing matplotlib module

from matplotlib import pyplot as plt

# x-axis values

x = [5, 2, 9, 4, 7]

# Y-axis values

y = [10, 5, 8, 4, 2]

# Function to plot

plt.plot(x,y)

# function to show the plot

plt.show()

Output :
Plots in Matplotlib

Bar plot using Matplotlib


By using matplotlib library in python , it allows us to access the
functions and classes provided by the library for plotting. There are
tow list x and y are defined . This function creates a bar plot by
taking x-axis and y-axis values as arguments and generates the bar
plot based on those values.

Python3

# importing matplotlib module


from matplotlib import pyplot as plt

# x-axis values

x = [5, 2, 9, 4, 7]

# Y-axis values

y = [10, 5, 8, 4, 2]

# Function to plot the bar

plt.bar(x,y)

# function to show the plot

plt.show()

Output:
Bar Plot

Histogram using Matplotlib


By using the matplotlib module defines the y-axis values for a
histogram plot. Plots in histogram using the hist() function and
displays the plot using the show() function. The hist() function
creates a histogram plot based on the values in the y-axis list.

Python3

# importing matplotlib module

from matplotlib import pyplot as plt


# Y-axis values

y = [10, 5, 8, 4, 2]

# Function to plot histogram

plt.hist(y)

# Function to show the plot

plt.show()

Output:

Histogram
Scatter Plot using Matplotlib
By imports the matplotlib module, defines x and y values for a
scatter plot, plots the data using the scatter() function, and displays
the plot using the show() function. The scatter() function creates a
scatter plot by plotting individual data points defined by the x and y
values.

Python3

# importing matplotlib module

from matplotlib import pyplot as plt

# x-axis values

x = [5, 2, 9, 4, 7]

# Y-axis values

y = [10, 5, 8, 4, 2]

# Function to plot scatter

plt.scatter(x, y)

# function to show the plot

plt.show()

Output :
Scatter Plot

We can also plot a scatter plot using the plot() method by providing
the marker style as ‘o’.

Python3

# importing matplotlib module

from matplotlib import pyplot as plt

# x-axis values

x = [5, 2, 9, 4, 7]

# Y-axis values

y = [10, 5, 8, 4, 2]
# Function to plot scatter using plot() method

plt.plot(x,y,'o')

# function to show the plot

plt.show()

Output:

Scatter Plot by using plot()


Chapter 3: Python Matplotlib –
An Overview
It is a very powerful plotting library useful for those working with
Python and NumPy. And for making statistical interference, it
becomes very necessary to visualize our data and Matplotlib is the
tool that can be very helpful for this purpose. It provides MATLAB
like interface only difference is that it uses Python and is open
source.

Installation
It is very easy to install Matplotlib in your PC, you just have to open
the command prompt and give the following command :
python -m pip install -U matplotlib
It is assumed that you are using the latest version of Python i.e
Python 3. and if you wish to foray into the world of Machine
Learning it is suggested to download Anaconda Package Distribution
which comes with many preinstalled libraries like Matplotlib, Numpy,
Pandas, Scikit-learn, and most important one is Jupyter Notebook.

Basics
Before moving further let us clear our basics,

Figure – It is a whole figure which contains one or more


than one axes or plots.
Axes – A figure contains usually more than one axes (plots)
and it may contain two or three in case of three-dimensional
structure or objects. Each Axes has a title, an X –label, and Y
–label.
Axis- It takes care of generating graph limits
Artists- Mostly they are tied to the axes, and whatever we
see on the figure like text objects, line2d objects, collection
objects.

Now that we have understood the basics, let us make a simple plot:
Making a simple plot

So, here we are passing two arrays as input and using show(), to get
the required plot, as from the graph you can see that the first array
appears on the x-axis and the second array appears on the y-axis of
the given plot. Now let us add the title to the plots
Plotting Multiple Sets of Data

We can also plot multiple sets of data by passing in multiple sets of


arguments of X and Y-axis in the plot,
Plotting with keyword Strings

Sometimes we have data in a format which lets us access the


particular variables with string, so matplotlib gives us such object
with the data keyword argument. So with these, you can generate
plots with strings corresponding to the given variables:
Working with text

Matplotlib has a text() command which can be used to add text in an


arbitrary location and the label() and title(), are used to add text in the
predefined positions :
Plotting Bar Graph
Now that we have already learned how to use texts and how to plot
a histogram, so let’s move forward and learn how can you plot the
bar graph. As we know that the bar graphs are the most common
type of graphs, so Matplotlib provides a bar(), function to make bar
graphs which may take the desired arguments which will we specify,
Plotting Pie charts

We can also plot the pie chart simply by using the pie() command and
passing the required arguments,
Scatter and Three Dimensional plotting

It is the most basic and most widely used graphs, especially they are
of great use in solving the regression problems. So let’s say we are
plotting to scatter diagram of grades range vs grades of boys and
girls in two different colors, (we always use different colors as the
graph should be easy to visualize)
And we can also view the above scatter in the three-dimensional
view, but for this, we have to import another module called mplot3d,
and when the module is imported we have to create three-
dimensional axes by using the keyword.
Projection = ‘3d’ to the axes(), and when the object is created, we
pass our arguments girls and boys grades, and grade range
Chapter 4: Using Matplotlib
with Jupyter Notebook
The Jupyter Notebook is an open-source web application that
allows you to create and share documents that contain live code,
equations, visualizations and narrative text. Uses include data
cleaning and transformation, numerical simulation, statistical
modeling, data visualization, machine learning, and much
more. Note: For more information, refer to How To Use Jupyter
Notebook – An Ultimate Guide 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.To get
started you just need to make the necessary imports, prepare some
data, and you can start plotting with the help of
the plot() function.When you’re done, remember to show your plot
using the show() function. Matplotlib is written in Python and
makes use of NumPy, the numerical mathematics extension of
Python.It consists of several plots like:
Line
Bar
Scatter
Histogram
And many more

Installation
Install Matplotlib with pip Matplotlib can also be installed
using the Python package manager, pip. To install Matplotlib
with pip, open a terminal window and type:

pip install matplotlib

Install Matplotlib with the Anaconda Prompt Matplotlib can


be installed using with the Anaconda Prompt. If the
Anaconda Prompt is available on your machine, it can usually
be seen in the Windows Start Menu. To install Matplotlib,
open the Anaconda Prompt and type:

conda install matplotlib

Using Matplotlib with Jupyter Notebook

After the installation is completed. Let’s start using Matplotlib with


Jupyter Notebook. We will be plotting various graphs in the Jupyter
Notebook using Matplotlib.

Line Plot
Python3

# importing matplotlib module

from matplotlib import pyplot as plt

# x-axis values

x = [5, 2, 9, 4, 7]

# Y-axis values

y = [10, 5, 8, 4, 2]

# Function to plot

plt.plot(x, y)

# function to show the plot

plt.show()

Output:
Bar Plot

Python3

# importing matplotlib module

from matplotlib import pyplot as plt

# x-axis values

x = [5, 2, 9, 4, 7]

# Y-axis values

y = [10, 5, 8, 4, 2]

# Function to plot

plt.bar(x, y)
# function to show the plot

plt.show()

Output:

Histogram

Python3

# importing matplotlib module

from matplotlib import pyplot as plt

# Y-axis values

y = [10, 5, 8, 4, 2]
# Function to plot histogram

plt.hist(y)

# Function to show the plot

plt.show()

Output :

Scatter Plot

Python3

# importing matplotlib module

from matplotlib import pyplot as plt

# x-axis values
x = [5, 2, 9, 4, 7]

# Y-axis values

y = [10, 5, 8, 4, 2]

# Function to plot scatter

plt.scatter(x, y)

# function to show the plot

plt.show()

Output :

Adding title and Labeling the Axes in the graph

We can add title to the graph by using the following command


matplotlib.pyplot.title("My title")
We can label the x-axis and y-axis by using the following functions
matplotlib.pyplot.xlabel("Time (Hr)")

matplotlib.pyplot.ylabel("Position (Km)")

Example :

Python3

# importing matplotlib module

from matplotlib import pyplot as plt

# x-axis values

x = [5, 2, 9, 4, 7]

# Y-axis values

y = [10, 5, 8, 4, 2]

# Function to plot

plt.scatter(x, y)

# Adding Title

plt.title("GeeksForGeeks")

# Labeling the axes


plt.xlabel("Time (hr)")

plt.ylabel("Position (Km)")

# function to show the plot

plt.show()

Output:

We can also write a program in the same cell for printing Multiple
Graphs together. We can print these graphs vertically one below
another by repeating the show() function in the program or we can
use a function called subplot() in order to print them horizontally
as well.

Python3

from matplotlib import pyplot as plt


x = [1, 2, 3, 4, 5]

y = [1, 4, 9, 16, 25]

plt.scatter(x, y)

# function to show the plot

plt.show()

plt.plot(x, y)

# function to show the plot

plt.show()

Output
Chapter 5: Pyplot in Matplotlib
Python is the most used language for Matplotlib is a plotting library
for creating static, animated, and interactive visualizations in Python.
Matplotlib can be used in Python scripts, the Python and IPython
shell, web application servers, and various graphical user interface
toolkits like Tkinter, awxPython, etc.
Note: For more information, refer to Python Matplotlib – An
Overview

Installing Matplotlib
To use Pyplot we must first download the Matplotlib module. For this
write the following command:
pip install matplotlib

What is Pyplot in Matplotlib?


Pyplot is a Matplotlib module that provides a MATLAB-like interface.
Matplotlib is designed to be as usable as MATLAB, with the ability to
use Python and the advantage of being free and open-source. Each
pyplot function makes some changes to a figure: e.g., creates a
figure, creates a plotting area in a figure, plots some lines in a
plotting area, decorates the plot with labels, etc. The various plots
we can utilize using Pyplot are Line Plot, Histogram, Scatter, 3D
Plot, Image, Contour, and Polar.
Syntax :
matplotlib.pyplot.plot(*args, scalex=True, scaley=True,
data=None, **kwargs)
Parameters:
This function accepts parameters that enable us to set axes scales
and format the graphs. These parameters are mentioned below :-

plot(x, y): plot x and y using default line style and color.

plot.axis([xmin, xmax, ymin, ymax]): scales the x-axis


and y-axis from minimum to maximum values

plot.(x, y, color=’green’, marker=’o’,


linestyle=’dashed’, linewidth=2, markersize=12):
x and y co-ordinates are marked using circular markers of
size 12 and green color line with — style of width 2

plot.xlabel(‘X-axis’): names x-axis

plot.ylabel(‘Y-axis’): names y-axis

plot(x, y, label = ‘Sample line ‘): plotted Sample Line will


be displayed as a legend

Plotting in Matplotlib
We will import the matplotlib library and then plot some example
data points.

Python3

# Python program to show plot function

import matplotlib.pyplot as plt

plt.plot([1, 2, 3, 4], [1, 4, 9, 16])

plt.axis([0, 6, 0, 20])
plt.show()

OUTPUT :

The plot function marks the x-coordinates(1, 2, 3, 4) and y-


coordinates(1, 4, 9, 16) in a linear graph with specified scales.

Pyplot Examples
For the sake of example, we will use Electricity Power Consumption
datasets of India and Bangladesh. Here, we are using Google Public
Data as a data source.
We will plot power consumption in kWh by India and Bangladesh
with years as X-axis.
Example 1: Linear Plot using matplotlib.pyplot

Python3

# Python Program to illustrate Linear Plotting

import matplotlib.pyplot as plt

# year contains the x-axis values

# and e-india & e-bangladesh

# are the y-axis values for plotting

year = [1972, 1982, 1992, 2002, 2012]

e_india = [100.6, 158.61, 305.54, 394.96, 724.79]

e_bangladesh = [10.5, 25.21, 58.65, 119.27, 274.87]

# plotting of x-axis(year) and

# y-axis(power consumption)

with different colored labels of two countries

plt.plot(year, e_india, color ='orange',

label ='India')

plt.plot(year, e_bangladesh, color ='g',


label ='Bangladesh')

# naming of x-axis and y-axis

plt.xlabel('Years')

plt.ylabel('Power consumption in kWh')

# naming the title of the plot

plt.title('Electricity consumption per capita\

of India and Bangladesh')

plt.legend()

plt.show()

Output :
Line Plot

Example 2: Linear Plot with line formatting


In this example we will plot the same plot but with a variation in the
lines plotted. We can use dashed line or a line with markers.

Python3

# Python Program to illustrate Linear Plotting

import matplotlib.pyplot as plt


year = [1972, 1982, 1992, 2002, 2012]

e_india = [100.6, 158.61, 305.54,

394.96, 724.79]

e_bangladesh = [10.5, 25.21, 58.65,

119.27, 274.87]

# formatting of line style and

# plotting of co-ordinates

plt.plot(year, e_india, color ='orange',

marker ='o', markersize = 12,

label ='India')

plt.plot(year, e_bangladesh, color ='g',

linestyle ='dashed', linewidth = 2,

label ='Bangladesh')

plt.xlabel('Years')

plt.ylabel('Power consumption in kWh')

plt.title('Electricity consumption per \

capita of India and Bangladesh')


plt.legend()

plt.show()

Output:

Line Plot with Line Formatting


Chapter 6: Matplotlib – Axes
Class
Matplotlib is one of the Python packages which is used for data
visualization. You can use the NumPy library to convert data into an
array and numerical mathematics extension of Python. Matplotlib
library is used for making 2D plots from data in arrays.
Axes class
Axes is the most basic and flexible unit for creating sub-plots. Axes
allow placement of plots at any location in the figure. A given figure
can contain many axes, but a given axes object can only be in one
figure. The axes contain two axis objects 2D as well as, three-axis
objects in the case of 3D. Let’s look at some basic functions of this
class.

axes() function
axes() function creates axes object with argument, where argument
is a list of 4 elements [left, bottom, width, height]. Let us now take a
brief look to understand the axes() function.
Syntax :
axes([left, bottom, width, height])

Example:

import matplotlib.pyplot as plt


fig = plt.figure()

#[left, bottom, width, height]

ax = plt.axes([0.1, 0.1, 0.8, 0.8])

Output:

Here in axes([0.1, 0.1, 0.8, 0.8]), the first ‘0.1’ refers to the distance
between the left side axis and border of the figure window is 10%,
of the total width of the figure window. The second ‘0.1’ refers to the
distance between the bottom side axis and the border of the figure
window is 10%, of the total height of the figure window. The
first ‘0.8’ means the axes width from left to right is 80% and the
latter ‘0.8’ means the axes height from the bottom to the top is 80%.

add_axes() function
Alternatively, you can also add the axes object to the figure by
calling the add_axes() method. It returns the axes object and adds
Random documents with unrelated
content Scribd suggests to you:
it over, and tell us if that accurately reports your conversation with
them on that date as best you can recall.
Mr. Pappas. I think it does; yes, basically.
Mr. Griffin. All right. Let me ask you, then, if you would sign the
interview report on the first page and initial the second page.
Mr. Pappas. All right.
Mr. Griffin. Sign it on the first page at a conspicuous spot at the
top.
Mr. Pappas. This is an affidavit?
Mr. Griffin. No; this is just an interview report.
Mr. Pappas. Do I get a copy of this?
Mr. Griffin. You can get a copy of the deposition that is being
taken here. And we can then——
Mr. Pappas. Can I have this read?
Mr. Griffin. Do you want to——
Mr. Pappas. No; it is all right.
All right. Where shall I sign it—right here?
Mr. Griffin. Up at the top; yes, and just initial the next page.
Now, let me hand you also what I have marked as Icarus M.
Pappas deposition, July 29, 1964, Exhibit No. 4.
(The document referred to was marked Icarus M. Pappas
Deposition Exhibit No. 4 for identification.)
Mr. Griffin. This is another interview report prepared by two
agents of the FBI, Eugene W. O’Neill, and James J. Rogers. It reports
an interview that they had with you in New York City June 30, 1964,
and it also consists of two pages. If you would read that, and also
tell us if that accurately reflects what you told them at that time.
Mr. Pappas. This does.
Mr. Griffin. Would you sign that, then, on the first page, and
initial the second? I might ask you one final question, which is a very
general question. In your experience, reporting this event, the
events of November 22, 23, and 24, do you feel that there were any
—that any restrictions or precautions could have been taken, either
to have provided more orderly distribution of information to the
press, or to safeguard Lee Oswald, that in your estimation were not
taken?
Mr. Pappas. I wonder if you could state that again?
Mr. Griffin. All right. Let me state it as two questions. From the
standpoint of a newspaper reporter, do you feel that the local
authorities in Dallas could have or should have instituted procedures
which would have provided a more orderly flow of news to the
press, or more restricted flow than was permitted?
Mr. Pappas. It is hard to say for me. I think that we got the news
from the police department. That is what I am concerned with. And
how I get it, whether it is orderly or not, is really none of my
concern. I think if that is the way they do it, holding interviews in a
hallway, that is the way I have to get it. I think that if they had set
up an auditorium somewhere and came in with reports, this would
be orderly. But how productive it would have been, I don’t know.
Mr. Griffin. Well, do you have——
Mr. Pappas. I think ideally, as a reporter, as a newsman, I think
ideally if there is an incident, a crash, or a homicide, or something, it
would make our job a lot easier if we could have all of the witnesses
and all of the interviews that we have to get brought in and placed
in front of us in a large auditorium. This would be nice and orderly
for us. But, unfortunately, that is not the way our business works.
Mr. Griffin. Well, do you think it would have been proper for the
police to have refused access—refused you people access to the
third floor?
Mr. Pappas. As far as a newsman is concerned; no.
Mr. Griffin. Let me ask you the second question, on the
protection of Lee Oswald. Did you observe any inadequacies in the
manner in which Oswald was protected that you would be able to
bring to our attention?
Mr. Pappas. I am not a police officer. I don’t know what is
adequate and what is not. I could not tell you. I am not a law officer.
Mr. Griffin. That is all right. I appreciate that. Do you have any
other observations that you would want to make about your
experiences in Dallas on those 3 days?
Mr. Pappas. Just that it was one of the saddest assignments that I
have had to cover ever, and that it was professionally a challenge.
That is all I could say generally about It.
Mr. Griffin. You haven’t any information that you think would be
of significance for us?
Mr. Pappas. Nothing; no. I have just told the story so many times.
I have just made every statement that I think could be made by me.
That is what I know at this point. Unless you can think of something
else specifically that you are puzzled about.
Mr. Griffin. No; I haven’t anything in mind. I think we have
covered it pretty well as far as we are concerned. One final question,
then. You and I have not had any off-the-record conversations, or
prior conversations before we began taking your deposition, have
we?
Mr. Pappas. Only when you wanted to finish your coffee.
Mr. Griffin. When I saw you out in the hallway and asked you to
wait a few minutes?
Mr. Pappas. Yes.
Mr. Griffin. But we did not discuss anything pertaining to your
testimony at that point?
Mr. Pappas. Nothing; no.
Mr. Griffin. I haven’t any further questions. I want to thank you
very much for coming here. You have been very helpful to us. The
tape recording and the photographs which you have provided in the
past have been of considerable use to us.
Mr. Pappas. Thank you for having me here, and I hope I have
been of some help in getting to the bottom of all of this.
TESTIMONY OF JOHN G.
McCULLOUGH
The testimony of John G. McCullough was taken at 11 a.m., on
July 29, 1964, at 200 Maryland Avenue NE., Washington, D.C., by
Messrs. Burt W. Griffin, assistant counsel, and Stuart Pollak, staff
member, of the President’s Commission.

Mr. Griffin. Let me introduce myself. My name is Burt Griffin. I


am a member of the advisory staff to the general counsel of the
President’s Commission on the Assassination of President Kennedy.
It is our normal practice before deposing a witness to explain a
little bit about what the Commission is about. I think you will find
most of what I have to say you are well aware of.
As you probably know, the Commission was established pursuant
to an Executive order of President Johnson and a joint resolution of
Congress. Under those two official acts, the Commission was
directed to investigate the assassination of President Kennedy and
the death of Lee Harvey Oswald, and to report back to President
Johnson, to find out all the facts it is able to determine.
We have asked you to come here today in particular because
you were in Dallas on the 22d, 23d, and 24th of November, and
because you did have occasion to see Jack Ruby on one of those
days.
I might also indicate that under the rules and regulations that
have been established by the Commission, I have been specifically
designated to take your deposition.
Also under these rules, you are entitled to a 3-day notice in
writing before you appear here. We did send you a letter, I believe. I
don’t know when you received it.
Mr. McCullough. I received the letter 3 days ago.
Mr. Griffin. All right. I might note for the record at this point Mr.
Stuart Pollak has just walked in. Do you have any questions that you
would like to ask?
Mr. McCullough. None at all. I think I am familiar with the
purpose of the Commission, and the reason for my being here.
Mr. Griffin. If you will raise your right hand, I will administer the
oath to you.
Do you solemnly swear that the testimony you shall give will be
the truth, the whole truth, and nothing but the truth, so help you
God?
Mr. McCullough. I do.
Mr. Griffin. Would you state for the record your full name?
Mr. McCullough. John G. McCullough.
Mr. Griffin. Where do you live?
Mr. McCullough. 6345 Woodbine Avenue, Philadelphia, Pa.
Mr. Griffin. By whom are you employed?
Mr. McCullough. The Philadelphia Bulletin.
Mr. Griffin. Were you employed by the Bulletin in November of
1963?
Mr. McCullough. I was; yes.
Mr. Griffin. In the course of your employment with the Bulletin,
did you go to Dallas after President Kennedy was shot?
Mr. McCullough. I went to Dallas within an hour after President
Kennedy was shot, and arrived in Dallas by plane about 7 p.m.,
Dallas time.
Mr. Griffin. What did you do when you got to Dallas? Where did
you go first?
Mr. McCullough. Do you want me to just continue?
Mr. Griffin. Yes.
Mr. McCullough. I went immediately to the Dallas Municipal
Building, and to the police headquarters. I am uncertain now of
exactly what floor this was on. I stayed at the police headquarters
floor of the building for 6 or 7 hours, since this was the scene of the
operations.
Mr. Griffin. Were you on that floor continuously during that
period, or were there times when you were off?
Mr. McCullough. There were times when I was off the floor, to
use the telephone, or to consult with other members of the Bulletin
staff who were also on assignment in Dallas. But most of the time I
was on the floor and in a narrow corridor outside the room in which
principals in the assassination of the President and the subsequent
events were being questioned by Dallas police officials. And I believe
by members of the Federal agencies.
I was not alone. There were at least 50 other reporters along
this narrow corridor. It was around midnight, to the best of my
recollection, when they brought a man who police told us was Lee
Harvey Oswald into an interrogation room. Trying to get a look at
the physical setup inside this room. I stood briefly on a metal
ashtray that was on the corridor. And coming down from this metal
ashtray, I hit with my right elbow a man who was standing beside
me. I apologized for bumping into the man and expressed the hope
that I had not struck his notes, assuming he was another reporter.
He explained to me that he was not a reporter, that he was a
businessman in Dallas, and I noted then that he was carrying a box.
I would guess it was about 8 inches to a foot square. And the reason
I remember it is on one side, in white lettering, on a blue
background, was the word “Alpacuna.” It struck me as odd, that a
reporter would be carrying a box. And then, of course, when he
explained he was a businessman I took a good look at him, because
I think reporters get annoyed—because there were enough of us in
the corridor without outsiders being there. I mentioned this to
another member of the Bulletin staff later, and then discovered after
the shooting of Oswald, the man I had bumped into that night was
Ruby.
Mr. Griffin. Let me ask you some questions about this. You
mentioned that you were trying to look into an interrogation room.
Mr. McCullough. Yes.
Mr. Griffin. Did this meeting with the man you think was Ruby,
did it occur on the third floor of the police department?
Mr. McCullough. I am not certain—on whatever floor the police
department offices are located. There is a whole string of them.
There is a homicide squad, robbery, theft units. I believe it was on
the third floor. It was not the upper floors. There were floors above.
I am fairly certain it was the third floor.
Mr. Griffin. But it was on the floor that the detective bureaus
were on?
Mr. McCullough. That is correct; yes.
Mr. Griffin. Now, what particular detective bureau or
interrogation room were you looking into at the time?
Mr. McCullough. There, again, I have to go on the basis of
recollection, but I believe it was the homicide squad. The officers
immediately involved with the investigation had been moving in and
out of that particular door for hours, bringing in, for instance, a bus
driver, a taxicab driver—at least from the clothing they wore. At one
point Oswald’s mother, at another point his wife were in and out of
this room.
Mr. Griffin. Was it Lee Oswald that you were trying to get a look
at?
Mr. McCullough. Actually, I knew I could not see him. I just was
wondering whether it was one large room or a maze of partitioned
offices, so I could describe it in the story I had planned to write.
Mr. Griffin. But what I wanted to ask you is was the thing that
prompted your getting up on this ashtray the fact that Lee Oswald
had been taken into that room?
Mr. McCullough. That is correct; yes.
Mr. Griffin. Now, do you recall a press conference that Henry
Wade held down in the basement some time that evening?
Mr. McCullough. Yes.
Mr. Griffin. Did this event which you are now describing, in
which you climbed up on the ashtray—did that occur before or after
the press conference?
Mr. McCullough. The event that I described, stepping up on the
ashtray momentarily, happened several hours prior to the press
conference held by District Attorney Wade.
Mr. Griffin. How do you arrive at the conclusion that it was
several hours?
Mr. McCullough. Well, there, again, I have to go on recollection.
But there was this much time ensued. In other words, after meeting
the man that I believed to be Ruby, I stayed for a long period—I
would estimate 2 hours, before the press conference was held.
Mr. Griffin. Do you recall if Lee Oswald was brought down into
that interrogation room again between the time you saw the man
you think is Ruby, and the time that Henry Wade held his press
conference in the basement?
Mr. McCullough. He was brought out of the interrogation room. I
don’t recall that he was brought back into it before the press
conference was held.
Mr. Griffin. Now, were you up on the third floor at the time that
—just shortly before the press conference was held?
Mr. McCullough. Yes.
Mr. Griffin. And do you recall, were you there when Henry Wade
and, I think, Captain Fritz, and perhaps Chief Curry, walked out of
the homicide room, just before everybody went down into the
basement? Do you recall that?
Mr. McCullough. Yes; I do. I believe that I was in an opening, or
at the main corridor, at the bay near the elevators, when the three
officers you mentioned, the three officials you mentioned, walked
along and said there would be a press conference.
Mr. Griffin. Do you recall that at that time, or just before Chief
Curry and Fritz and Wade came out, that Lee Oswald had been in
the homicide office?
Mr. McCullough. Yes. In other words, Oswald had been in the
homicide office before I again saw those three officials.
Mr. Griffin. What I am getting at is whether you recall that Fritz
and Curry came out of that homicide office just after something had
taken place in there with Oswald.
Mr. McCullough. No; this I do not recall—whether there was any
immediacy involved there.
Mr. Griffin. Let me ask you this question, then: Are you clear in
your mind that the occasion on which you saw Ruby was a
substantial period of time before the occasion when Fritz and Curry
came out?
Mr. McCullough. Yes. However, I might add that certainly Fritz,
and I believe to a lesser extent Curry were in and out of that room
many times. I mean it was not just one movement into the room,
and then a long period of time, and a final movement out by those
two officers. They were moving in and out at different times during
the evening.
Mr. Griffin. Now, maybe we can work at the time that you saw
the man you think is Ruby from the other end. That is, focusing on
your activities shortly after you arrived at the police station. You say
you arrived in Dallas about 7, and you went directly to the police
station. So I assume that you got there somewhere around 7:30. Did
you check into a hotel first?
Mr. McCullough. Yes; we checked into a hotel immediately across
the street from the police station, municipal building.
Mr. Griffin. When you got up there in the police department, did
anything occur between the time you arrived and the time you saw
the man that you think was Ruby that is significant in your mind that
we might use to pinpoint time here?
Mr. McCullough. No; except that there was, again, a period of
time ensuing between my arrival at the police headquarters and my
seeing Ruby, and that would have been occupied on my part by
trying to talk to the police officials and trying to get, I believe, to see
Wade and interviewing just everyone I could get ahold of who knew
anything at all about it.
Mr. Griffin. When you saw the man you believed was Ruby, did
he indicate to you what kind of business he was in?
Mr. McCullough. No; he didn’t say what kind of business. This is
what made the box stay in my mind. I assumed he was a shirt
merchant or something, or that it was a sweater. And there, again,
the reason for my remembering him was a bit of annoyance on my
part that there was outsiders in that row, when it was terribly
crowded.
Mr. Griffin. Did this look like the kind of box one would carry
clothes or shirts or sweaters in?
Mr. McCullough. Only because I in my own mind related the word
Alpacuna to some sort of textile trade name. I had never seen the
name before.
Mr. Griffin. I don’t know what Alpacuna is. Have you
subsequently learned?
Mr. McCullough. No; and the man at the time was wearing, I
believe it is called, a porkpie hat, and he had a topcoat. This, I
remembered, because most of the reporters were not wearing
topcoats, and certainly were not wearing hats.
Mr. Griffin. What kind of a topcoat did he have on?
Mr. McCullough. It was a dark blue topcoat.
Mr. Griffin. When you rubbed elbows with this man, what was
his response in the sense of—was it a polite gentlemanly response?
Mr. McCullough. It was a smile. And the explanation, as I said,
that he was not a newspaperman, and that he was a businessman.
In other words, he indicated there was no need to apologize, that I
had not struck his notes or made him scribble. And he, as everyone
along there, was starting into this door, waiting to see what would
happen next.
Mr. Griffin. Did you see him again?
Mr. McCullough. No; I did not see him at the press conference at
which Oswald appeared. However, the fact that he was there and
wearing the same clothing was told me later by a police judge who
was present at that press conference.
Mr. Griffin. Justice of the Peace David Johnston?
Mr. McCullough. Yes. I went to his office the following day in
another part of—actually in a suburb of Dallas, to follow up the
story. And—I am sorry, it was not the following day. It must have
been Monday, when it was then clear that the man who shot Oswald
was Ruby. And I mentioned to Johnston that I had bumped into this
man. And the police judge said, that he, too, had seen him at the
press conference, and that Ruby had approached him and handed
him a card, a gray card, advertising the club that he operated.
Mr. Griffin. Do you have a clear recollection that Johnston said
that Ruby was wearing an overcoat?
Mr. McCullough. This I don’t—I have no clear recollection, but I
did mention the clothing, the hat, and Johnston said that this was
the same—the hat I did mention.
Mr. Griffin. Yes.
Mr. McCullough. But I don’t remember whether or not I
mentioned the topcoat.
Mr. Griffin. Were you able to see what sort of clothes the man
you believe was Ruby had on under the topcoat?
Mr. McCullough. No; I could not see that. However, after the
jostling, after I had jostled him, we did stand together, I would
guess, for 5 or 10 minutes. There was no further exchange,
conversation between us.
Mr. Griffin. Did you see him attempt to talk or talk with other
people?
Mr. McCullough. No; I did not notice; no.
Mr. Griffin. When you went down to the assembly room, where
Henry Wade had his press conference, do you recall where you were
standing in relationship to Wade and the front of the room?
Mr. McCullough. Yes; it is a large room with tables and benches. I
would have been to the left side of the room facing what was a
standup box, a police lineup box, a screen police lineup box, and
some distance back, about one quarter of the distance back—in
other words, I was not immediately in the front.
Mr. Griffin. When you say the left side of the room——
Mr. McCullough. Facing this police lineup box, and there was a
small stage, a foot perhaps in elevation from the floor level.
Mr. Griffin. Now, as I have already asked you, when you were
down there, you did not see this same man again?
Mr. McCullough. No; I did not see Ruby again.
Mr. Griffin. What did you do after the Henry Wade press
conference ended?
Mr. McCullough. I stayed there for perhaps a half hour talking to
other reporters. Of course, Oswald himself was brought into the
room.
Mr. Griffin. Yes.
Mr. McCullough. And someone put a microphone in his face. He
said something about his civil rights being violated. He was taken
out. We talked to Wade. He gave us some information. When Wade
left, we talked to various—there, again, it was just a general attempt
to interview everyone and anyone who knew anything at all about
the offense. And I would guess that after about an hour, I went back
to the hotel. I am sorry that I am fuzzy on the times, but I have not
used my notes to recollect or jog my memory on all these things. I
perhaps should have. But I haven’t had an opportunity.
Mr. Griffin. Do you have your notes with you now?
Mr. McCullough. No; I do not. They would be in the office. I used
a regular spiral notebook, and kept pretty full notes. However, I did
give a statement to the two agents from the FBI of the Philadelphia
office, within a few days after my return to Philadelphia. This would
have been before the end of November and the times would, of
course, have been a great deal clearer.
Mr. Griffin. Did you use your notes in the course of that
interview?
Mr. McCullough. Yes; I did.
Mr. Griffin. Did you remain in the press conference room for a
substantial period of time after Henry Wade left, or did you follow
out and do something?
Mr. McCullough. I would say between a half hour and an hour. In
other words, when all of the police officials and other municipal
officials of Dallas left, there was no one else to talk to, so I left.
Mr. Griffin. How long did you remain at the police department
that night, then?
Mr. McCullough. Well, it would have been from perhaps 8 p.m.
Dallas time, Friday night, November 22, until perhaps somewhere
between 2 and 3 a.m. of the Saturday following, November 23.
Mr. Griffin. What time is it your best recollection that you
returned to the police department during the day on Saturday?
Mr. McCullough. Probably about 10 a.m., and I say that again
without any vivid recollection, but because of the fact that we are an
afternoon paper and we are publishing in that period. And this was
my assignment.
Mr. Griffin. Are you able to recall what you were doing and
whether you were at the police department between approximately
2 in the afternoon on Saturday and 6 in the evening?
Mr. McCullough. No; this I cannot recall.
Mr. Griffin. Did you go to the police department some time
Sunday morning?
Mr. McCullough. I went to the police department Sunday morning
at about 9:30 a.m.
Mr. Griffin. And where did you station yourself?
Mr. McCullough. I went first to—again—to the police
headquarters offices on the third floor, and then went down to the
basement garage after it was explained to me that Oswald would be
moved to the basement garage level in a special elevator serving the
cell block, and would be taken from the basement level, put in a
vehicle, and taken to the county prison.
Mr. Griffin. About how long before Oswald actually came out did
you go down into the basement?
Mr. McCullough. There, again, it is a guess. I would say an hour,
an hour and a half. I was there quite a long time.
Mr. Griffin. Do you recall where you were standing at the time
that Oswald was shot?
Mr. McCullough. Yes; this I recall very clearly, because I stood on
a guard railing protecting a ramp leading to a parking level in the
garage. This was a metal railing perhaps 2 feet high, and I stood
there supporting myself against a very wide concrete pillar to get a
better look at what was going on. There were so many people there,
it was difficult to get a decent look, because of my height.
Mr. Griffin. Are you familiar—as you are down there in that
basement, and you are standing on that guard railing, looking
toward the jail office—that Commerce Street is on your left, or to the
south, and Main Street is on your right, or to the north?
Mr. McCullough. I am not too familiar with the streets.
Mr. Griffin. Let me give you a sheet of paper. Why don’t you
draw a diagram of that basement, and see if we cannot locate you in
reference most particularly to the ramp and the jail office.
Mr. McCullough. This on an overall basis would be the municipal
building. This cross section would be the basement level. Leading
into the garage section of the basement is a door. And this section
right here is, I think it is called, the police check-in room.
Mr. Griffin. Jail office?
Mr. McCullough. Jail office.
Mr. Griffin. Would you want to write in there “Jail Office” where
that is?
Mr. McCullough. There is a door then leading into the corridor.
This is the ramp. It is a slight grade, leading down to the parking
levels on either side of the ramp. There are several large pillars, I
guess over 2 feet square, concrete pillars, along here.
Mr. Griffin. Let me ask you to write in there what is the ramp
that the automobiles come in from the streets.
Mr. McCullough. These would be—as a matter of fact, this is the
in lane, and this is the out lane.
Mr. Griffin. You have drawn an arrow indicating the in lane which
is Main Street, if you want to write that in.
Mr. McCullough. I didn’t know the names of the streets there.
Mr. Griffin. And, of course, the out, or up ramp is Commerce
Street.
Mr. McCullough. I was there for a sufficiently long time, for
instance, that there were very few reporters there when I arrived.
The police officers on duty asked me several times for credentials,
which I showed. I was there while they went into parked police cars
and removed from the parked police cars weapons which they took
somewhere into the jail office. I was there when they backed in an
armored car from the Commerce Street exit. They could not get it
very far back because of overhead ducts, the heating ducts serving
the building. So they had to leave the armored car virtually at the
exit. It was parked then on an incline.
Mr. Griffin. Where did you station yourself?
Mr. McCullough. The railing that I mentioned leads along this
ramp, and actually it is two metal bars. And I stood on the upper
metal bar, leaning against this pillar. In other words, my position
would have been here, where I am putting this “X.”
Mr. Griffin. And let me state for the record that you have marked
a position on the railing which is along what I will call the entrance
to the garage. You might write “garage” there. And it is not the
railing that is actually on the Commerce Street ramp, or Main Street
ramp.
Mr. McCullough. Actually—that is right. I was immediately against
the pillar. In other words, I was using the pillar for support.
Mr. Griffin. And you were on the Commerce Street side of the
garage?
Mr. McCullough. Yes.
Mr. Griffin. Now, as you stood up there on that pillar, or on that
railing, do you remember an automobile coming out of the garage
and coming up the Main Street ramp just shortly before Oswald
came out?
Mr. McCullough. No; I do not. I remember one car coming out of
the parking level and heading toward the Commerce Street ramp,
and parking there. Because, for awhile I feared—had it not moved
forward, it would have blocked my vision. But it did move forward
slightly toward Commerce Street, and then it did give me a clear
view.
Mr. Griffin. Do you recall what ability you had to see from the
position that you were at up to the top of the Main Street ramp, and
to distinguish faces and figures?
Mr. McCullough. This would have been very limited. I made no
effort to look in that direction.
Mr. Griffin. My real question is do you recall——
Mr. McCullough. No; I don’t recall. I may add—the area along the
inner part of the ramp, that is the part of the ramp closest to the
parking garage, and nearest to Main Street, was pretty well taken up
by television cameras, the heavy rolling type, rather than the hand
type of equipment.
Mr. Griffin. Do you recall any initial instructions that were given
to the press people in the basement, as to where they were to
station themselves?
Mr. McCullough. Yes; we were told by several police officers—as a
matter of fact, from the first moment of my entry into this area, I
was told that we were to station ourselves along the ramp, not too
close to the exits, and once we were told that Oswald was on his
way down, that we were not to move at all.
Mr. Griffin. Do you recall any instruction being given that you
were to remain on the garage side of the railings that border the
automobile ramp?
Mr. McCullough. I don’t recall any such instructions, because at
one point. I was standing against a wall, which would be the side of
the ramp away from the garage area, and closer to Commerce
Street. But I left that, there again, because I had no vision—there
was nothing I could see from that particular point.
Mr. Griffin. Do you recall any instructions being given that people
were not to station themselves across the Main Street ramp from the
railing to the wall?
Mr. McCullough. I heard no such instructions.
Mr. Griffin. Were you able to observe what efforts were being
made on Friday, Saturday, and Sunday to check identification of
newspaper people?
Mr. McCullough. I myself thought that the security in the garage
area on Sunday was fairly strong. In other words, I was asked at
least four or five times for credentials. And when I moved to this
position here——
Mr. Griffin. The one on the railing?
Mr. McCullough. Indicated by the “X” on the railing—a police
officer came over and told me first to get down until I showed him
credentials, and then he let me stand. There was some—both Friday
night and Saturday there were also occasional checks made. I would
say that at least twice on Friday night, and probably twice on
Saturday, when I was in and out of the municipal building, that I
was asked for press credentials.
Mr. Griffin. Was this as you were entering or leaving the
building?
Mr. McCullough. On Friday night it was as we left the elevator to
the third floor, which is located at the police offices, the
departmental offices. On Saturday we were asked for credentials
before we were permitted into the elevators, leading up to that floor.
And, again, as we got off the elevator—they were designated by
colored patches on their shoulders—there were a number of
auxiliary police officers on duty Saturday.
Mr. Griffin. Mr. Pollak, do you have any questions that you would
like to ask?
Mr. Pollak. I would just ask whether the witness saw anybody
other than the man he thought was Ruby who did not appear to be
authorized as a newsman in the third floor corridor on Friday or
Saturday?
Mr. McCullough. No. Well, the other robbery units and auto theft
were still trying to function Friday night, and moved their people into
this crowd along the corridor. So there were what would be civilians
and, I suppose, people having business with the police department
moving in and out of there constantly.
Mr. Pollak. Did these people you just referred to—were they
normally escorted by a police officer?
Mr. McCullough. Yes; they were always with an officer, and went
into one of the other offices. As I say, I remember specifically there
were some sailors in uniform, and a man reporting a stolen
automobile—these things you remember because when anybody
came along the corridor, none of us had any idea who it might be
coming, and everyone watched to see who it was. Incidentally, while
I saw the shooting of Oswald, I was not at that time able to identify
the man who did the shooting as the same man I had seen in the
corridor, because as he moved out of the crowd of people along the
ramp toward Oswald, all that I could see was a side view and the
back of the head. It was a different type of hat, too.
Mr. Griffin. The hat was different?
Mr. McCullough. Yes; it was a gray felt hat, or a dark gray felt
hat, on Sunday—not the sporty type porkpie that I had seen Friday
night. It wasn’t actually until I saw a full face photograph of the man
on television and in the newspapers that I was sure who he was.
Mr. Griffin. Have you ever seen Jack Ruby in person?
Mr. McCullough. No.
Mr. Griffin. You used the term that you were sure who it was. Is
there any hesitancy or doubt in your mind?
Mr. McCullough. No; not in my own mind. In other words, I
would say my own personal identification would be that the man I
saw in the corridor outside the police headquarters on Friday is the
same man who was later arrested for the shooting of Oswald.
Mr. Griffin. I have marked for the purposes of identification the
diagram that you have drawn here as John G. McCullough
Deposition, July 29, 1964, Exhibit No. 1.
(The document referred to was marked John G. McCullough
Deposition Exhibit No. 1 for identification.)
Mr. Griffin. For the purpose of our record, I would like you to
sign that below where I have marked it.
Mr. McCullough. With the qualification that I make no pretext of
being an engineer or architect. As a matter of fact, the ramp that I
have indicated is not—is slightly closer to——
Mr. Griffin. The garage entrance?
Mr. McCullough. The garage entrance; yes. The ramp leading to
the garage entrance is closer to Commerce Street than it would
indicate on this sketch.
Mr. Griffin. Well, if it is reassuring to you, we already have a
diagram, a chart that has been previously made up of the basement.
I think the diagram you have drawn for us indicates with a fair
degree of accuracy.
Mr. McCullough. The other thing that would help me to see what
happened in there, was the fact that it was so well lighted by the
television cameras. Stark lighting, it almost seemed.
Mr. Griffin. I am going to hand you a second exhibit which I
have marked as John G. McCullough Deposition, July 29, 1964,
Exhibit No. 2.
(The document referred to was marked John G. McCullough
Deposition Exhibit No. 2 for identification.)
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like