You are not HMC5883L! So if you use the libraries for the HMC you will get a random (noise) direction. Once you use the QMC libraries the result looks ok. But they are not HMC5883. Look at the markings on the chip.
GeeekPi Raspberry Pi Cluster Case with Cooling Fan and Heatsink for Pi 4 Model B, 3 Model B+ & 3/2 Model B
11 Review
🌐 MCIGICM 2 Channel DC 5V Relay Module: Optocoupler Low Level Trigger Expansion Board for Arduino UNO R3, DSP, ARM, PIC, AVR, STM32, Raspberry Pi
11 Review
Vilros Raspberry Pi 4 4GB Complete Starter Kit - Black Fan-Cooled Aluminum Case for Heavy-Duty Performance
12 Review
🎁 Ultimate BBC Micro bit Sensor Starter Kit: Keyestudio 37-in-1 Box with Tutorial, Compatible with V1.5 & V2, Gift for Kids and Adults (Microbit Board Not Included)
11 Review
M.2 Screw Kit: Easy Mounting for NVMe SSDs on ASUS Motherboards
19 Review
🔧 Premium Repair Replacement Screws & Tools for MacBook Pro Retina 15"/13" - Complete Bottom Case Set
10 Review
🖥️ Helifouner 450-Piece Computer Standoffs Spacer Screws Kit: Ideal for Hard Drive, Motherboard, Fan, Power Graphics & Computer Cases
10 Review
Comprehensive 500pcs Laptop Screw Kit Set for 🔩 IBM HP Dell Lenovo Samsung Sony Toshiba Gateway Acer
12 Review