CNM - C5

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

20 Terms

1
New cards
<p>how to test this function</p>

how to test this function

knowt flashcard image
2
New cards

what do you import to make graphs on python?

import matplotlib.pyplot as plt

3
New cards
<p>how to plot these valuies</p>

how to plot these valuies

plt.plot(x, y) - this produces a lineplot

4
New cards

is the figure and the legend when plotting graphs

the figure is the overall page that everything is drawn on and the legend is the key to your graph

5
New cards
<p>how to add these axes to a figure </p>

how to add these axes to a figure

knowt flashcard image
6
New cards

what do subplots do and how do you use them

<p></p>
7
New cards

how to plot a red sinx and blue cosx line on the same graph with a legend

knowt flashcard image
8
New cards

how to annotate the word ‘hi’ on a graph pointing to point (5,5) with text at point (3,7)

knowt flashcard image
9
New cards
<p>how to produce this (shade area between the lines)</p>

how to produce this (shade area between the lines)

knowt flashcard image
10
New cards

how to produce a scatter plot with a colour scale

knowt flashcard image
11
New cards

how to plot bar charts

knowt flashcard image
12
New cards

how to plot cumulative and non-cumulative histograms

knowt flashcard image
13
New cards

How do you label the x-axis ‘X’

plt.xlabel(“X”)

14
New cards

how do you create a 2×1 grid of subplots (two rows, one column)

plt.subplot(2, 1, 1) and plt.subplot(2, 1, 2)

third slot is for index - tell python what position you want that plot in

15
New cards

what are valid matplotlib line styles?

knowt flashcard image
16
New cards

what does plt.show() do

The first time its called it shows all plots created, then closes them

The second time its called it shows all plots created since the last plt.show()

in exam it will likely just refer to showing all figures created so far

17
New cards

in the annotate function, what does the argument xy represent

the point being annotated - where the arrow should end

18
New cards

What library/libraries are used to work with dates in a plot?

import matplotlib.dates as mdates

import datetime as dt

19
New cards

What does the parameter alpha generally control in visualizations?

 Transparency of objects

20
New cards

If x is a NumPy array of data, what does plt.hist(x, bins=10) do?

The range of values in x is divided into 10 equal-width intervals (bins).

Matplotlib counts how many data points fall into each bin.

These counts are shown as bars, representing the data distribution.