Machine Learning
40.3K subscribers
3.61K photos
29 videos
47 files
638 links
Real Machine Learning — simple, practical, and built on experience.
Learn step by step with clear explanations and working code.

Admin: @HusseinSheikho || @Hussein_Sheikho
Download Telegram
fig, ax = plt.subplots() # Single subplot
fig, axes = plt.subplots(2, 2) # 2x2 grid of subplots

• Plot on a specific subplot (Axes object).
axes[0, 0].plot(x, np.sin(x))

• Set the title for a specific subplot.
axes[0, 0].set_title('Subplot 1')

• Set labels for a specific subplot.
axes[0, 0].set_xlabel('X-axis')
axes[0, 0].set_ylabel('Y-axis')

• Add a legend to a specific subplot.
axes[0, 0].legend(['Sine'])

• Add a main title for the entire figure.
fig.suptitle('Main Figure Title')

• Automatically adjust subplot parameters for a tight layout.
plt.tight_layout()

• Share x or y axes between subplots.
fig, axes = plt.subplots(2, 1, sharex=True)

• Get the current Axes instance.
ax = plt.gca()

• Create a second y-axis that shares the x-axis.
ax2 = ax.twinx()


VI. Specialized Plots

• Create a contour plot.
X, Y = np.meshgrid(x, x)
Z = np.sin(X) * np.cos(Y)
plt.contour(X, Y, Z, levels=10)

• Create a filled contour plot.
plt.contourf(X, Y, Z)

• Create a stream plot for vector fields.
U, V = np.cos(X), np.sin(Y)
plt.streamplot(X, Y, U, V)

• Create a 3D surface plot.
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(X, Y, Z)


#Python #Matplotlib #DataVisualization #DataScience #Plotting

━━━━━━━━━━━━━━━
By: @DataScienceM
📌 What Building My First Dashboard Taught Me About Data Storytelling

🗂 Category: DATA SCIENCE

🕒 Date: 2025-11-04 | ⏱️ Read time: 7 min read

The experience of building a first data dashboard offers a powerful lesson in data storytelling. The key takeaway is that prioritizing clarity over complexity is crucial for turning raw data into a compelling and understandable narrative. Effective dashboards don't just display metrics; they communicate insights by focusing on a clear story, ensuring the audience can easily grasp and act upon the information presented.

#DataStorytelling #DataVisualization #DashboardDesign #DataAnalytics
1
📌 Data Visualization Explained (Part 5): Visualizing Time-Series Data in Python (Matplotlib, Plotly, and Altair)

🗂 Category: DATA VISUALIZATION

🕒 Date: 2025-11-20 | ⏱️ Read time: 12 min read

Master time-series data visualization in Python with this in-depth guide. The article offers a practical exploration of plotting temporal data, complete with detailed code examples. Learn how to effectively leverage popular libraries like Matplotlib, Plotly, and Altair to create insightful and compelling visualizations for your data science projects.

#DataVisualization #Python #TimeSeries #DataScience
3🔥1