Sitemap
Geek Culture

A new tech publication by Start it up (http://jeetwincasinos.com/swlh).

Member-only story

Matplotlib tutorial

How to Visualize Hilbert Matrix in Python

In 2D and 3D using Matplotlib

7 min readAug 18, 2023

--

The other day I came across an article explaining what Hilbert matrix is and showing how to visualize it.

I liked the article and since the original content produced visualization in MATLAB I’ve shamelessly decided to steal the idea and reproduce the results in Python using Matplotlib.

This article will briefly explain:

  • what Hilbert matrix

However, its main purpose is to practice creating:

  • 2D heat map style plots
  • 3D plots
  • plots with colour bars

I’ll also show you a few ways you can use to calculate Hilbert matrix:

  • using for loops
  • using vectorization
  • wrapping a solution in a function

Let’s get to it.

Hilbert matrix

Pawel Jastrzebski
Pawel Jastrzebski

Written by Pawel Jastrzebski

I use Python 🐍 and Inkscape 🗻 for data viz 🖼 • matplotlib fan • I share tips, tutorials & articles - let me teach you something • Don't be a stranger 👋

No responses yet