ComenzarEmpieza gratis

Gráficas múltiples

En el ejercicio final vamos a representar una comparación de los alquileres de mercado justo para apartamentos de 1 y 2 dormitorios.

Este ejercicio forma parte del curso

Visualización de datos intermedia con Seaborn

Ver curso

Instrucciones del ejercicio

  • Crea dos objetos de ejes, ax0 y ax1.
  • Dibuja fmr_1 en ax0 y fmr_2 en ax1.
  • Muestra las gráficas en paralelo.

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

# Create a plot with 1 row and 2 columns that share the y axis label
fig, (ax0, ax1) = plt.subplots(nrows=____, ncols=____, sharey=____)

# Plot the distribution of 1 bedroom apartments on ax0
sns.histplot(df['____'], ax=____)
____.set(xlabel="1 Bedroom Fair Market Rent", xlim=(100,1500))

# Plot the distribution of 2 bedroom apartments on ax1
sns.histplot(df['____'], ax=____)
____.set(xlabel="2 Bedroom Fair Market Rent", xlim=(100,1500))

# Display the plot
plt.show()
Editar y ejecutar código