This problem seems like a natural for a 3D graph, with x, y and z projected onto the page and a surface used for the z elements. In any event, the PDL code (piddle) has some graphing routines that handle both 2 and 3D contexts, in the Module PDL::Graphics::TriD. I think this installs if you install PDL from CPAN.