mirror of
https://github.com/Fechin/reference.git
synced 2026-11-21 05:24:10 +03:00
feat: fix code highlighting and upgrade dependencies
- Fix markdown-it-highlightjs configuration for Hexo 7.0+ - Create custom highlight.js instance to handle unknown languages gracefully - Eliminate 'Could not find language' warning messages - Upgrade ESLint to v9 with flat config format - Update Fuse.js from 6.4.6 to 7.1.0 - Update multiple dependencies to latest versions Technical changes: - Set syntax_highlighter to empty in _config.yml - Add langPrefix: 'hljs language-' configuration - Migrate ESLint to eslint.config.js (flat config) - Update Service Worker for new Fuse.js version
This commit is contained in:
1 parent
3b60a4c9fa
commit
8fd81decca
18 files changed
+756
-769
No files matched your search
+14
-16
@@ -1,13 +1,13 @@
|
||||
---
|
||||
title: "Matplotlib"
|
||||
title: 'Matplotlib'
|
||||
date: 06-06-2025
|
||||
background: bg-[#1a073e]
|
||||
tags:
|
||||
- "data visualization"
|
||||
- "matplotlib"
|
||||
- "plotting"
|
||||
- 'data visualization'
|
||||
- 'matplotlib'
|
||||
- 'plotting'
|
||||
categories:
|
||||
- "Python"
|
||||
- 'Python'
|
||||
intro: |
|
||||
[Matplotlib](https://matplotlib.org/) is a comprehensive library for creating static, animated, and interactive plots in Python.
|
||||
This cheat sheet provides a quick reference from basic to advanced usage, covering essential features for data science, machine learning, and scientific computing.
|
||||
@@ -15,10 +15,9 @@ plugins:
|
||||
- copyCode
|
||||
---
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Getting Started {.cols-2}
|
||||
## Getting Started {.cols-2}
|
||||
|
||||
### Importing
|
||||
|
||||
@@ -38,7 +37,7 @@ plt.show() # Display the plot
|
||||
|
||||
---
|
||||
|
||||
## Plot Types {.cols-2}
|
||||
## Plot Types {.cols-2}
|
||||
|
||||
### Line Plot
|
||||
|
||||
@@ -98,7 +97,7 @@ plt.show()
|
||||
|
||||
---
|
||||
|
||||
## Customization {.row-span-2}
|
||||
## Customization {.row-span-2}
|
||||
|
||||
| Feature | Code Example | Description |
|
||||
| --------------- | ------------------------------------------------------------------------------------ | ------------------------------------------- |
|
||||
@@ -117,7 +116,7 @@ plt.show()
|
||||
|
||||
---
|
||||
|
||||
## Subplots & Layouts
|
||||
## Subplots & Layouts
|
||||
|
||||
### Multiple Subplots
|
||||
|
||||
@@ -139,7 +138,7 @@ plt.figure(figsize=(10, 5)) # Set figure size (width, height in inches)
|
||||
|
||||
---
|
||||
|
||||
## Advanced Visualizations {.cols-2}
|
||||
## Advanced Visualizations {.cols-2}
|
||||
|
||||
### Heatmap
|
||||
|
||||
@@ -174,7 +173,7 @@ plt.show()
|
||||
|
||||
---
|
||||
|
||||
## Working with Images
|
||||
## Working with Images
|
||||
|
||||
```python
|
||||
import matplotlib.image as mpimg
|
||||
@@ -233,7 +232,7 @@ plt.show()
|
||||
|
||||
---
|
||||
|
||||
## Saving Plots
|
||||
## Saving Plots
|
||||
|
||||
```python
|
||||
plt.savefig("figure.png", dpi=300, bbox_inches='tight') # Save plot to file
|
||||
@@ -241,7 +240,7 @@ plt.savefig("figure.png", dpi=300, bbox_inches='tight') # Save plot to file
|
||||
|
||||
---
|
||||
|
||||
## Show & Clear
|
||||
## Show & Clear
|
||||
|
||||
```python
|
||||
plt.show() # Show plot window
|
||||
@@ -251,7 +250,7 @@ plt.close() # Close figure window (useful in scripts or GUI apps)
|
||||
|
||||
---
|
||||
|
||||
## More Useful Functions
|
||||
## More Useful Functions
|
||||
|
||||
| Function | Use Case |
|
||||
| ------------------------------ | ------------------------------- |
|
||||
@@ -265,4 +264,3 @@ plt.close() # Close figure window (useful in scripts or GUI apps)
|
||||
| `plt.gcf()` | Get current figure |
|
||||
|
||||
---
|
||||
|
||||
Reference in new issue
Block a user