I am trying to figure out how to apply the proper sequence of translate and scale commands (or a single .transform command) so that the default pixel grid (0,0,1920,1080) for instance is setup so that the coordinate system  (minx,miny,maxx,maxy) can be used where for instance minx=100 maxx=200 miny=-5 maxy=5I am trying to render mathematical functions and map the results to pixels and use the mouse to select certain regions to zoom in on.. my current code is at https://bitbucket.org/stephenc214/fastmath/src/default/src/fastmath/fx/HardyZMap.javaI would really appreciate any help... I know this is simple but I just can't seem to get it to work properly
how to map rectangular coordinate system onto JavaFX GraphicsContext canvas
transformations;affine transformations
import javafx.scene.canvas.GraphicsContext;import javafx.scene.transform.Affine;import javafx.scene.transform.NonInvertibleTransformException;double xrange = maxx - minx;double yrange = maxy - miny;// width and height are in units of pixels// gc is the GraphicsContext object from javafxAffine t = new Affine();double xratio = xrange / width;double yratio = yrange / height;t.appendTranslation( minx, miny );t.appendScale( xratio, yratio );try{  t.invert();}catch( NonInvertibleTransformException e ){  throw new RuntimeException( e.getMessage(), e );}gc.setTransform( t );