Menu

Zero level contour with "tile" plot

Help
2015-07-21
2015-08-04
  • Petr Aleksandrov

    I want to draw a zero level contour and tile plot on the same picture (as is shown on the attached picture). But the contour is not partially invisible. On the right subplot an oval must be drawn same as well as on the left subplot. How can I correct it?
    I used an OpenGL variant.

     

    Last edit: Petr Aleksandrov 2015-07-21
  • Petr Aleksandrov

    I have solved this problem using the following code:

    graph.SetRange('z', -1, 0)
    graph.SetRange('c', color_axis_min, color_axis_max)
    mglData z(nx, ny)
    z.Put(-1)
    graph.SurfC(x, y, z, data)
    graph.Cont(contour_levels, x, y, data, 'k')

    x, y are 1D mglData objects (with size nx and ny correspondingly), data is 2D mglData object (nx * ny). contour_levels is a mglData object with one zero element.

    This solution is based on the third variant in https://sourceforge.net/p/mathgl/discussion/508394/thread/c8373a46/ . But according to the manual (for version 2.3.3), "TileS" method draws tiles with different sizes. So it is not suitable for my purpose.

     

    Last edit: Petr Aleksandrov 2015-08-04

Log in to post a comment.