plpot nicht richtig installiert?
-
Hi,
ich versuche plplot für Grafikausgaben zu nutzen, leider erhalte ich in der Konsole folgende Fehlermeldung....
** PLPLOT WARNING ***
Option '' not recognized.Recognized options for this driver are:
hrshsym: Use Hershey symbol set (hrshsym=0|1)
backend: Choose backend: (0) standard, (1) using AGG library, (2) using wxGraphicsContext
text: Use own text routines (text=0|1)
Program abortedOS: Opensuse
Ich bernutze folgnende Klassen:
1. wxPLplotstream
2. wxPLplotwindowvon: http://www.koders.com/cpp/fid1717C9766A4525E235625450E67999E171CBF781.aspx?s=string
als Inspirationesquelle nutze ich folgendes Beispiel...
wxPanel* panel = new wxPanel( this ); wxBoxSizer* box = new wxBoxSizer( wxVERTICAL ); plotwindow = new wxPLplotwindow( panel ); box->Add( plotwindow, 1, wxALL | wxEXPAND, 0 ); panel->SetSizer( box ); SetSize( 640, 500 ); wxPLplotstream* stream = plotwindow->GetStream(); stream->col0( 1 ); stream->env( -2.0, 10.0, -0.4, 1.2, 0, 2 ); stream->col0( 2 ); stream->sdiplt( 0.0f, 0.0f, 1.0f, 1.0f ); stream->lab( "x-axis", "y-axis", "title" ); // Draw the lines int size=2048; PLFLT* x = new PLFLT[size]; PLFLT* y = new PLFLT[size]; // Fill up the arrays. for( int i=0; i<size; i++ ) { x[i] = (i/20.48 - 19.0) / 6.0; y[i] = 1.0; if( x[i] != 0.0 ) y[i] = sin(2*x[i]) / (2*x[i]); } stream->col0( 3 ); stream->wid( 2 ); stream->line( size, x, y ); stream->wid( 1 ); plotwindow->Refresh();
In meiner Main.cpp mache ich das...
wxMyFrame::wxMyFrame { ... panel1 = new wxPanel(Panel1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL, _T("ID_PANEL1")); ... wxPLplotwindow* plotwindow1 = new wxPLplotwindow( panel1 ); ... SizerPanel1->Add( plotwindow1, 1, wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP, 5); ...
Kompilieren lässt sich alles wunderbar.
Ach ja, vergessen. Das ist installiert:
libplplot9 - Shared libraries for libplplot 5.8.0-7.1
libplplot-dev 5.9.5-4
libplplot-devel 5.8.0-7.1
plplot 5.8.0-7.1 (5.9.8-4.2)Gruß
Franky