{"id":24022,"library":"matviz","title":"matviz","description":"matviz provides simple matrix data visualization tools built on matplotlib and numpy. Current version 1.0.6 supports Python >=3.10. Development appears intermittent with no recent releases since v1.0.0 (July 2023).","status":"active","version":"1.0.6","language":"python","source_language":"en","source_url":"https://github.com/JLansey/matviz","tags":["matrix","visualization","heatmap","matplotlib"],"install":[{"cmd":"pip install matviz","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Plotting backend","package":"matplotlib","optional":false},{"reason":"Array operations","package":"numpy","optional":false}],"imports":[{"note":"Direct import of plot_matrix is required; the module does not expose functions via dot notation.","wrong":"import matviz","symbol":"plot_matrix","correct":"from matviz import plot_matrix"},{"note":"MatrixPlotter is directly exposed at package level, not in a submodule.","wrong":"from matviz.plotter import MatrixPlotter","symbol":"MatrixPlotter","correct":"from matviz import MatrixPlotter"}],"quickstart":{"code":"import numpy as np\nfrom matviz import plot_matrix\n\ndata = np.random.rand(5,5)\nfig, ax = plot_matrix(data, title='My Matrix')\nimport matplotlib.pyplot as plt\nplt.show()","lang":"python","description":"Create a basic matrix heatmap with matviz."},"warnings":[{"fix":"Use fig, ax = plot_matrix(data) instead of fig = plot_matrix(data).","message":"plot_matrix returns a figure and axes tuple, not just a figure. Unpack with fig, ax = plot_matrix(...) to avoid AttributeError.","severity":"gotcha","affected_versions":"all"},{"fix":"import matplotlib; matplotlib.use('Agg') before import matviz.","message":"The library relies on matplotlib's interactive backend. If running in a headless environment, set matplotlib backend to 'Agg' before importing matviz.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to 1.0.0+ and use plot_matrix.","message":"Functions like heatmap and correlation_plot from early versions (pre-1.0.0) are deprecated. Use plot_matrix instead.","severity":"deprecated","affected_versions":"<1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from matviz import plot_matrix' and then 'plot_matrix(data)'.","cause":"Using 'import matviz' and then 'matviz.plot_matrix()' instead of direct import.","error":"AttributeError: module 'matviz' has no attribute 'plot_matrix'"},{"fix":"Ensure input is a 2D numpy array of shape (rows, cols). Use np.array(data).reshape(rows, cols) if needed.","cause":"Passing a 2D array but with incompatible dimensions for the selected color mapping or axis.","error":"ValueError: could not broadcast input array from shape (n,m) into shape (n,)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}