Menu

Using a MathPlot inside a wxFrame

Help
2011-02-23
2013-05-02
  • 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:

    http://wxmathplot.sourceforge.net/docs/a00018.html#a6b73c492a971974d7d740d5dcf0ce1e2

    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.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.