http://webwork.maa.org/wiki/DynamicImages
when defining a graph object, the pixel dimensions can be specified. It's the size parameter in this example:
$gr = init_graph(-1,-1,4,4, axes=>[0,0], grid=>[5,5], size=>[400,400] );
Later, in the problem body when you call the graph, you specify the pixel dimensions that the image should display at:
image( insertGraph($gr), width=>200,height=>200,tex_size=>800 )These are the width and height parameters. Technically there is no need for these to match the dimensions from when the image was created, but making them match will prevent undesirable stretching/compression in the graph details.
Is there some way to call upon the graph object's size, if it has been specified? I'm thinking of something like:
image( insertGraph($gr), width=>$gr->size[0],height=>$gr->size[1],tex_size=>800 )Of course this would be nice for avoiding unintended discrepancies. But also it would help with automating good choices for the dimensions in the PreTeXt project I am working on.