Philosophical Depth in Rabia's Poetry Themes
Description
This script generates a visually appealing bar chart to represent the philosophical depth of themes in Rabia's poetry. It highlights the following features: Themes: Five key themes from Rabia's poetry are listed—Existential Questions, Motivations for Worship, Re-evaluation of Practices, Agency and Authenticity, and Beliefs about Divinity. Depth Scores: Each theme is assigned a numerical depth score on a scale from 0 to 10, reflecting its philosophical richness. Bar Chart: Bars are color-coded using a distinct palette for clarity and visual differentiation. Scores are annotated directly on the bars for immediate reference. Presentation: A clear title, labeled axes, and descriptive y-axis scores enhance interpretability. The x-axis features rotated theme names for better readability. A gridline overlays the background to aid in comparing scores visually. This visualization succinctly captures the intellectual and reflective depth of Rabia's poetry themes, offering a clear perspective on their varying impacts.
Files
Steps to reproduce
import matplotlib.pyplot as plt import numpy as np # Define themes in Rabia's poetry themes = ['Existential Questions', 'Motivations for Worship', 'Re-evaluation of Practices', 'Agency and Authenticity', 'Beliefs about Divinity'] # Represent their philosophical depth numerically depth_scores = [9, 8, 8.5, 9.5, 8.7] # Define a color palette for the bars colors = ['#6baed6', '#fd8d3c', '#74c476', '#9e9ac8', '#fdae6b'] # Plotting fig, ax = plt.subplots(figsize=(10, 6)) bars = ax.bar(themes, depth_scores, color=colors, edgecolor='black', alpha=0.8) # Annotate the bars with scores for bar in bars: height = bar.get_height() ax.text(bar.get_x() + bar.get_width() / 2, height - 0.3, f'{height}', ha='center', color='white', fontsize=12, fontweight='bold') # Adding titles and labels ax.set_title("Philosophical Depth in Rabia's Poetry Themes", fontsize=14, fontweight='bold') ax.set_ylabel('Depth Score (0-10)', fontsize=12) ax.set_xlabel('Themes', fontsize=12) ax.set_ylim(0, 10) ax.grid(axis='y', linestyle='--', alpha=0.7) plt.xticks(rotation=45, ha='right', fontsize=11) plt.tight_layout() plt.show()