# sparsity_input.txt # # Discussion: # # Display the sparsity pattern (location of nonzeros) of a matrix. # # In order for the picture to "look" like a matrix, we have to do # some transposition and negation. In other words, if matrix entry (R,C) # is nonzero, then the corresponding entry in the gnuplot file should # be (C,-R). That adjusts for the difference between the matrix (I,J) # and Cartesian (X,Y) coordinates systems # # Licensing: # # This code is distributed under the GNU LGPL license. # # Modified: # # 14 October 2013 # # Author: # # John Burkardt # set term png # set output "sparsity_1.png" set size ratio 1 set title "Initial sparsity pattern" set xlabel "Column" set ylabel "Row (ignore minus sign)" set timestamp plot "sparsity_1_data.txt" # set output "sparsity_2.png" set size ratio 1 set title "Sparsity pattern after reordering" set xlabel "Column" set ylabel "Row (ignore minus sign)" set timestamp plot "sparsity_2_data.txt" # quit