<jupyter_start><jupyter_text>Once again, we make use of the Pokémon data for this exercise.<jupyter_code>pokemon = pd.read_csv('./Data/pokemon.csv')
pokemon.head()<jupyter_output><empty_output><jupyter_text>**Task 1**: There are also variables in the dataset that don't have anything to do with the game mechanics, and are just there for flavor. Try plotting the distribution of Pokémon heights (given in meters). For this exercise, experiment with different axis limits as well as bin widths to see what gives the clearest view of the data.<jupyter_code># YOUR CODE HERE
sns.displot(data=pokemon, x='height');
# check min, max heights to create bin edges
pokemon.describe()['height']
bin_edges = np.arange(0, pokemon['height'].max()+0.2, 0.2)

sns.displot(data=pokemon, x='height', bins=bin_edges);
plt.xlim(0,6); #axis trimming
# run this cell to check your work against ours
scales_solution_1()<jupyter_output>There's a very long tail of Pokemon heights. Here, I've focused in on Pokemon of height 6 meters or less, so that I can use a smaller bin size to get a more detailed look at the main data distribution.<jupyter_text>--------  Log Transformation- Setting ticks in cycles of `1-3-10` or `1-2-5-10` are very useful for base-10 log transforms. **Task 2**: In this task, you should plot the distribution of Pokémon weights (given in kilograms). Due to the very large range of values taken, you will probably want to perform an _axis transformation_ as part of your visualization workflow.<jupyter_code>pokemon.columns
# YOUR CODE HERE
pokemon.describe()['weight']
sns.displot(data=pokemon, x='weight', bins=bin_edges)
plt.xscale('log')
# check log value
np.log10(pokemon.describe()['weight'])
# using log values, create bins
bin_edges = 10**np.arange(-1, 3+0.1, 0.1)
ticks=[0.1, 0.3, 10, 30, 100, 300, 1000]

sns.displot(data=pokemon, x='weight', bins=bin_edges)
plt.xscale('log')
plt.xticks(ticks, ticks);
plt.xlabel("weight (kg)");
# run this cell to check your work against ours
scales_solution_2()<jupyter_output>Since Pokemon weights are so skewed, I used a log transformation on the x-axis. Bin edges are in increments of 0.1 powers of ten, with custom tick marks to demonstrate the log scaling.