Uploaded November 2020 | Updated November 2026, 1 hour ago
This video shows how to add points at arbitrary x, y positions to plots in base R and ggplot2.
If you find this video useful, like, share and subscribe to support the channel!
► Subscribe: youtube.com/c/DataDaft?sub_confirmation=1
Code used in this R Code Clip:
# Add points to a base R plot
# Create plot
plot(mtcars$mpg, mtcars$hp)
# Add a point
points(x = 15, # point x coordinate
y = 100, # point y coordinate
pch = 15, # point shape
col = "red", # point color
cex = 3) # point size
# Add another point
points(x = 25, # point x coordinate
y = 250, # point y coordinate
pch = 17, # point shape
col = "blue", # point color
cex = 4) # point size
# Add points in ggplot
library(tidyverse)
ggplot(data = mtcars, aes(x = mpg, y = hp)) +
geom_point() + # Create scatterplot
geom_point(aes(x=15, y=100), # Add a point
col ="red",
shape = 15,
size = 8) +
annotate("point", x=25, y=250, # Add another point
col ="blue",
shape = 17,
size = 10)
* Note: YouTube does not allow greater than or less than symbols in the text description, so the code above will not be exactly the same as the code shown in the video! I will use Unicode large < and > symbols in place of the standard sized ones.
This video shows how to add points at arbitrary x, y positions to plots in base R and ggplot2.
If you find this video useful, like, share and subscribe to support the channel!
► Subscribe: youtube.com/c/DataDaft?sub_confirmation=1
Code used in this R Code Clip:
# Add points to a base R plot
# Create plot
plot(mtcars$mpg, mtcars$hp)
# Add a point
points(x = 15, # point x coordinate
y = 100, # point y coordinate
pch = 15, # point shape
col = "red", # point color
cex = 3) # point size
# Add another point
points(x = 25, # point x coordinate
y = 250, # point y coordinate
pch = 17, # point shape
col = "blue", # point color
cex = 4) # point size
# Add points in ggplot
library(tidyverse)
ggplot(data = mtcars, aes(x = mpg, y = hp)) +
geom_point() + # Create scatterplot
geom_point(aes(x=15, y=100), # Add a point
col ="red",
shape = 15,
size = 8) +
annotate("point", x=25, y=250, # Add another point
col ="blue",
shape = 17,
size = 10)
* Note: YouTube does not allow greater than or less than symbols in the text description, so the code above will not be exactly the same as the code shown in the video! I will use Unicode large < and > symbols in place of the standard sized ones.



![How To Use map() In Pandas (Python)
↓ Code Available Below! ↓
This video shows how to map functions to columns of pandas data frames using .map(). The .map() function operates on pandas series and applies a function or dictionary mapping to each element of the series. Since the columns of data frames are series, it provides a convenient way of generating new columns by applying functions or correspondences elementwise on existing columns.
If you find this video useful, like, share and subscribe to support the channel!
► Subscribe: https://www.youtube.com/c/DataDaft?sub_confirmation=1
Code used in this Python Code Clip:
import pandas as pd
data = pd.DataFrame({power_level: [12000, 16000, 4000, 1500, 3000,
2000, 1600, 2000],
uniform color: [orange, blue, black, orange,
purple, green, orange, orange],
species: [saiyan,saiyan,saiyan,half saiyan,
namak,human,human,human]},
index = [Goku,Vegeta, Nappa,Gohan,
Piccolo,Tien,Yamcha, Krillin])
data
# Use .map() to apply a function to a pandas Series
# Data Frame columns are Series
def my_function(x):
if x > 10000:
return(high)
if x > 2000:
return(med)
return (low)
data[power_level].map(my_function)
# To map Series values based on key: value correspondence
# Pass a mapping dictionary to .map()
correspondence = {saiyan: alien,
namak:alien,
human:earthling,
half saiyan: earthling}
data[species].map(correspondence)
* Note: YouTube does not allow greater than or less than symbols in the text description, so the code above will not be exactly the same as the code shown in the video! I will use Unicode large < and > symbols in place of the standard sized ones. .
⭐ Kite is a free AI-powered coding assistant that integrates with popular editors and IDEs to give you smart code completions and docs while you’re typing. It is a cool application of machine learning that can also help you code faster! Check it out here: https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=datadaft&utm_content=description-only How To Use map() In Pandas (Python)](https://i.ytimg.com/vi/uM4_SY4mXj4/mqdefault.jpg)
![How to Use enumerate() in Python
Code available in comment below! This video shows the basics of how to use enumerate() in Python. enumerate() is useful for looping through data structures like lists while having access to each index and the corresponding value for each iteration of the loop.
characters = [Krillin,Goku, Vegeta, Gohan, Piccolo]
# enumerate() returns a sequence of (index, item) tuples
list(enumerate(characters))
# Use enumerate() in a for loop to get an item and its index
for index, character in enumerate(characters):
print(index, character)
# Why might you want to use enumerate?
# Example: store index positions of duplicate items
characters = [Krillin,Goku, Goku, Gohan, Piccolo,
Krillin,Goku, Vegeta, Gohan, Piccolo,
Piccolo,Goku, Vegeta, Goku, Piccolo]
character_map = {character:[] for character in set(characters)}
print(character_map)
# Use enumerate to store the index for each occurence
for index, character in enumerate(characters):
character_map[character].append(index)
character_map How to Use enumerate() in Python](https://i.ytimg.com/vi/uPT-LkYSP_o/mqdefault.jpg)
![Naruto Power Levels Over Time (1 Second = 1 Episode)
Naruto power levels from Naruto 1 through Shippuden 500. Every episode is displayed for approximately 1 second. Note that the video only shows power levels relevant to the current timeline (does not include flashbacks) and it skips long spans of filler episodes. Also note that the video shows a character’s current power level. This means a character that is strong but exhausted, injured or suppressing his power might appear lower than expected.
The concept of “power levels” are not a part of Naruto canon like they are in Dragonball, but I thought it would be fun to make a power level plot video similar to my Dragonball video, showing the flow of the story of Naruto over time as expressed through rough character power levels. Many viewers have expressed interest in such a video.
It is not possible to make a direct translation from Dragonball power levels to Naruto, since the concept of strength in the two shows is different. In Dragonball, power is fairly easy to quantify: the stronger a character is, the more speed, durability and more destructive power they have. In Naruto, power is more nuanced. Fights are more strategic and often based upon techniques like ninjutsu and genjutsu instead of brute force, DBZ style taijutsu and energy projection. The power levels here are meant to roughly fit into the DBZ conception of power level, but Naruto characters will generally have lower durability and raw destructive power than DBZ characters at similar power levels, while having more techniques and abilities.
Also note that one character having a higher power level than another does not necessarily mean they would win a fight. Certain characters counter others with abilities and some characters are able to fight well above their power level due to strategy and preparation. Some characters are capable of drastically raising their power levels for short bursts (chidori, rasengan, opening gates, etc.) which allows them to take down opponents with higher base power levels.
General guide to Naruto power level tiers in this video:
Power Level 0: Unconscious/Dead
Power Level 1-10: Normal Person
Power Level 10-100: Genin Level
Power Level 100-200: Chunin Level
Power Level 200-400: Jounin Level
Power Level 400-800: Jounin+ Level (Strong Jounin)
Power Level 800-1500: Kage Level
Power Level 1500-4000: Kage+ Level (Strong Kage)
Power Level 4000-10000: Demigod Level
Power Level 10000+: God Level
About the video:
Data: Custom hand-made data set
Plotting: flourish
Music:
1. Naruto - Strong And Strike (https://www.youtube.com/watch?v=57stJGfNN-I)
*Update* This song has been replaced with an audio library track due to a Content ID claim that blocked the video.
2. Kana Boon – Silhouette (https://www.youtube.com/watch?v=FswTx00PeOU&ab_channel=TreckMusicRandomTreckMusicRandom)
3. Track: Naruto Main Theme Remix (No Copyrights) Naruto Shippuden Anime Music, OST & Soundtrack [NCFS UPDATE]
Music provided by No Copyrights Free Sounds
Watch: https://youtu.be/EPhuRrHLPKI
Free Download / Stream: https://tii.ai/nN43 Naruto Power Levels Over Time (1 Second = 1 Episode)](https://i.ytimg.com/vi/uUfT7RtmLkk/mqdefault.jpg)




