I've been working with the mem driver. I need to be able to plot some data to a subregion of an image in memory. Suppose for instance that you've set the image memory to have dimensions 500 x 500, and you want to plot to a 200 x 200 subregion of that memory with top left coordinate (60, 100).

I can't see how to do this properly without modifying the source code, because the memory for the subregion is not continuous. Right now, I've added a c_plssubmem function to plcore.c which takes the dimensions and top left coordinate of the subregion (provided plsmem is called prior), and modified plD_line_mem in mem.c .

Is there a better way to do this? If not, is this capability one that would be good to have as part of the plplot source?