class_docstr: Map representing different coordinate systems.
  
  Coordinate definitions:
  
  * axes-coordinates goes from 0 to 1 in the domain.
  * data-coordinates are specified by the input x-y coordinates.
  * grid-coordinates goes from 0 to N and 0 to M for an N x M grid,
    where N and M match the shape of the input data.
  * mask-coordinates goes from 0 to N and 0 to M for an N x M mask,
    where N and M are user-specified to control the density of streamlines.
  
  This class also has methods for adding trajectories to the StreamMask.
  Before adding a trajectory, run `start_trajectory` to keep track of regions
  crossed by a given trajectory. Later, if you decide the trajectory is bad
  (e.g., if the trajectory is very short) just call `undo_trajectory`.
class_docstr_tok: ["Map","representing","different","coordinate","systems",".","Coordinate","definitions",":","*","axes-coordinates","goes","from","0","to","1","in","the","domain",".","*","data-coordinates","are","specified","by","the","input","x-y","coordinates",".","*","grid-coordinates","goes","from","0","to","N","and","0","to","M","for","an","N","x","M","grid",",","where","N","and","M","match","the","shape","of","the","input","data",".","*","mask-coordinates","goes","from","0","to","N","and","0","to","M","for","an","N","x","M","mask",",","where","N","and","M","are","user-specified","to","control","the","density","of","streamlines",".","This","class","also","has","methods","for","adding","trajectories","to","the","StreamMask",".","Before","adding","a","trajectory",",","run","`","start_trajectory","`","to","keep","track","of","regions","crossed","by","a","given","trajectory",".","Later",",","if","you","decide","the","trajectory","is","bad","(","e.g.",",","if","the","trajectory","is","very","short",")","just","call","`","undo_trajectory","`","."]
code: def mask2grid(self, xm, ym):
      return xm * self.x_mask2grid, ym * self.y_mask2grid
  
imports: import numpy
  import matplotlib
  from matplotlib import _api, cm, patches
  import matplotlib.colors
  import matplotlib.collections
  import matplotlib.lines
label_desc: Use image node_id 3 for calling the DomainMap obj's underlying member method code with example usage: obj.mask2grid(xm, ym) and returns: unknown,  unknown