Skip to main content
Participant
January 31, 2009
Question

postscript & sparse matrices: howto?

  • January 31, 2009
  • 1 reply
  • 669 views
hi!

i'm dealing with matrices here and want to plot its value into postscript. in fact, i just need a black spot where a matrix entry is not zero, white everywhere else. easy, isn't it?

particulary, my matrices have very few non-zero entries, so the ps file would only have a few black spots here and there.

now, what's the best way to write this in postscript? the first thing i tried was the image environment: works well as soon as you got used to the syntax, but the big disadvantage for me was that i have to explicitly code all the white pixels, so the eps file gets a lot bigger than needed (it feels).

the second thing i tried was defining a small "draw tiny box" command, then "move to" the non-zero spots, and evoke the function.
that's better then the image way (the files are a lot smaller), but it still feels like a hack somehow.

do you have any hints or suggestions for the issue? are there any commands or environment that would be better suited?

all hints appreciated!

cheers,
nico
This topic has been closed for replies.

1 reply

Participant
February 9, 2009
I am having exactly the same problem, the raster EPS gets extremely large! Any ideas anyone?