Menu

Two plots on one picture

Help
2012-04-24
2012-10-16
  • Petr Aleksandrov

    How can I draw two plots: Tile (2d data) and a line (1d data, with function
    Plot)? If I simple do it, the whole line is not visible - it is partially
    covered by the Tile plot. I need only 2d plot, I needn't rotating it and so
    on.

     
  • Alexey Balakin

    Alexey Balakin - 2012-04-25

    Generally you need to put yours curve above the tiles. Supposing yours z-range
    is , you can use 3 possibilities:

    1. Draw the plot at top of axis by specifying z coordinate, like this

      mglData z(x); z.Fill(1,1); gr->Plot(x,y,z);

    2. The same as previous one but done by option:

      gr->Plot(x,y,"","zrange 1 1");

    3. Draw tiles under the plot, for example, by changing z-coordinate:

      z.Fill(-1,-1); gr->TileS(z,c);

     

Log in to post a comment.