Using a MathPlot inside a wxFrame

  • Arthur Dias

    Arthur Dias - 2011-02-23

    Does someone have a simple tutorial for putting wxMathPlot graphivcs inside a wxframe?

    I already have the frame, and need to set some space inside  it and draw ECG lines.

  • Jeanne-Kamikaze

    Jeanne-Kamikaze - 2011-08-02

    I could also use some help here; a complete example would be nice.

    To plot a graph you need an mpWindow, which you can embed in a wxFrame. To do that you just need to call this constructor:

    And pass whatever wxFrame you want it embedded into as the wxWindow* argument. That'll get your mpWindow kicking.

    The problem that I face now is that the mpFX::Plot takes two arguments, a device context and an mpWindow. How should I set up a device context for drawing into an mpWindow?

  • Jeanne-Kamikaze

    Jeanne-Kamikaze - 2011-08-03

    Ok I've sorted that out, just needed to create a dc pointing at the mpWindow.


Log in to post a comment.