Height Of Male Models May 2026
from dataclasses import dataclass from datetime import datetime from typing import List, Optional, Dict import statistics @dataclass class MaleModel: id: str name: str height_cm: float # height in centimeters height_ft_in: Optional[str] = None # e.g., "6'1"" agency: Optional[str] = None category: Optional[str] = None # runway, commercial, fitness, etc. measurement_date: Optional[datetime] = None
def __post_init__(self): if not self.height_ft_in and self.height_cm: self.height_ft_in = self.cm_to_ft_in(self.height_cm) height of male models
def plot_height_distribution(self, save_path: str = None): """Create histogram with KDE of height distribution""" fig, axes = plt.subplots(2, 2, figsize=(15, 10)) # Histogram with KDE axes[0, 0].hist(self.heights, bins=15, edgecolor='black', alpha=0.7, density=True) sns.kdeplot(self.heights, ax=axes[0, 0], color='red', linewidth=2) axes[0, 0].set_xlabel('Height (cm)') axes[0, 0].set_ylabel('Density') axes[0, 0].set_title('Height Distribution with KDE') axes[0, 0].axvline(statistics.mean(self.heights), color='green', linestyle='--', label='Mean') axes[0, 0].axvline(statistics.median(self.heights), color='orange', linestyle='--', label='Median') axes[0, 0].legend() # Box plot axes[0, 1].boxplot(self.heights, vert=True, patch_artist=True) axes[0, 1].set_ylabel('Height (cm)') axes[0, 1].set_title('Height Distribution Box Plot') axes[0, 1].grid(True, alpha=0.3) # Cumulative distribution sorted_heights = np.sort(self.heights) cumulative = np.arange(1, len(sorted_heights) + 1) / len(sorted_heights) axes[1, 0].plot(sorted_heights, cumulative, marker='.', linestyle='none', markersize=3) axes[1, 0].set_xlabel('Height (cm)') axes[1, 0].set_ylabel('Cumulative Probability') axes[1, 0].set_title('Cumulative Distribution Function') axes[1, 0].grid(True, alpha=0.3) # Category comparison cat_data = self.analyzer.distribution_by_category() categories = list(cat_data.keys()) means = [cat_data[cat]['mean'] for cat in categories] axes[1, 1].bar(categories, means, color=['blue', 'green', 'orange']) axes[1, 1].set_ylabel('Mean Height (cm)') axes[1, 1].set_title('Mean Height by Category') axes[1, 1].grid(True, alpha=0.3, axis='y') plt.tight_layout() if save_path: plt.savefig(save_path, dpi=300, bbox_inches='tight') plt.show() axes = plt.subplots(2