Menu

#2791 Plotting heatmap with sparse matrix fails if either (min_x, min_y) or (max_x, max_y) are missing

None
closed-fixed
nobody
None
2025-06-04
2025-04-29
Anonymous
No

Consider the following example:

#!/usr/bin/env gnuplot

set terminal png
set output "test.png"

$test_data << EOD
0 0 0 # fails if this entry is missing
0 1 1
1 0 2
1 1 3 # fails if this entry is missing
EOD

plot $test_data sparse matrix=(2,2) using 1:2:3 with image notitle;

This works fine in this version, or when the entries 0 1 1 or 1 0 2 are removed. However, when removing the first or the last entry (the ones with the lowest and highest x and y coordinates, respectively, gnuplot fails with the error line 13: image coordinates undefined. This error message seems to come from src/graphics.c:process_image in the current code (631c9c6066d4b0d3ed2a58b0bba6ab1f0b13862f). The behavior reproduces on this commit and using gnuplot 6.0 patchlevel 2.

Discussion

  • Ethan Merritt

    Ethan Merritt - 2025-05-02
    • status: open --> pending-fixed
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2025-06-04
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.