Page 1 of 3

2D-Plots

Posted: Thu Jul 05, 2018 10:53 am
by wxJack
Hi devs, hi everybody!
What do you use in order to create 2D-plots ?
I need a library to do this and show the grap in a wxFrame.
Has anyone some advice about it?
Thank you very much
wish you all a lovely day

Re: 2D-Plots

Posted: Thu Jul 05, 2018 1:04 pm
by mill-j
I used both wxFreeChart and wxMathPlot with good success.

I settled on wxFreeChart. The original project works but was abandoned years ago, I did however find this repository https://github.com/iwbnwif/wxFreeChart that's fairly up to date.

They both have good samples for reference.

Hope this helps.

Re: 2D-Plots

Posted: Thu Jul 05, 2018 1:48 pm
by wxJack
Thank you very much, yesterday I tried wxFreeChart but the old version I'm afraid..indeed I had troubles.
Now I try yours, I will let you know!

Re: 2D-Plots

Posted: Thu Jul 05, 2018 2:12 pm
by wxJack
Did you have any problem during the installation?
I tried to follow the instrunctions.
I moved with cd path_of_my_WxFreeChart\Build and tried this
"> nmake -fmakefile.vc WX_DIR=c:\path\to\my\wxWidgets WX_UNICODE=0/1 WX_DEBUG=0/1 WX_SHARED=0/1 WX_MONOLITHIC=0/1"
but I have an error (nmake not recognized internal external command).

Re: 2D-Plots

Posted: Thu Jul 05, 2018 2:14 pm
by doublemax
Which compiler do you use? The command with "nmake" is only for Visual Studio.

Re: 2D-Plots

Posted: Thu Jul 05, 2018 2:18 pm
by wxJack
I use visual studio actually:)
Now I can try to setting Path for visual studio command line. Hope it's the correct thing to do

Re: 2D-Plots

Posted: Thu Jul 05, 2018 2:23 pm
by doublemax
Did you open a Visual Studio command prompt? (It's in the Visual Studio start menu entry).

Re: 2D-Plots

Posted: Thu Jul 05, 2018 2:29 pm
by wxJack
Now yes, and the prompt says "ACCESS DENIED".
I should open it with admin permissions I suppose

EDIT: If I try , prompt says "not expected" (non atteso, in italian, I think the mening is this more or less)

Re: 2D-Plots

Posted: Thu Jul 05, 2018 2:50 pm
by doublemax
What happens if you just type "nmake", is it found or do you get an error?

If it's found, please post exactly which command line you used.

Re: 2D-Plots

Posted: Thu Jul 05, 2018 2:59 pm
by wxJack
case 1) Visual studio command line (open in visual studio, without admin permissions).
If I write "nmake", (the whole line is "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools>nmake" )

the output is the following

Microsoft (R) Program Maintenance Utility Version 14.14.26430.0
Copyright (C) Microsoft Corporation. All rights reserved.

NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.

case 2) General Prompt open with admin permissions; then, "cd c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools" ;
and finally "nmake" shows this output

" nmake not recognized internal external command"

Thanks for the help

Re: 2D-Plots

Posted: Thu Jul 05, 2018 3:01 pm
by doublemax
You have to navigate to where the makefile is (makefile.vc).

Re: 2D-Plots

Posted: Thu Jul 05, 2018 3:05 pm
by mill-j
I use http://tdm-gcc.tdragon.net/ for all my dev stuff under Windows. It easily integrates with Geany, my IDE on all three platforms. I also built against wx 3.1.1.

I also noticed in the command you ran the 1/0 means 1 or 0 e.g. WX_DEBUG=1 would build the debug version while WX_DEBUG=0 wouldn't.

Hope this makes sense...

Re: 2D-Plots

Posted: Thu Jul 05, 2018 3:28 pm
by wxJack
doublemax wrote:You have to navigate to where the makefile is (makefile.vc).
In the visual studio command prompt, I move the current directory where the makefile is with this line:
"cd C:\Users\Jack\Desktop\wxFreeChart\wxFreeChart-master\build" ;
then I write "nmake", and the whole command line is : " C:\Users\Jack\Desktop\wxFreeChart\wxFreeChart-master\build>nmake" ..
giving me this output

Microsoft (R) Program Maintenance Utility Version 14.14.26430.0
Copyright (C) Microsoft Corporation. All rights reserved.

NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.

________________________________
mill-j wrote:I use http://tdm-gcc.tdragon.net/ for all my dev stuff under Windows. It easily integrates with Geany, my IDE on all three platforms. I also built against wx 3.1.1.

I also noticed in the command you ran the 1/0 means 1 or 0 e.g. WX_DEBUG=1 would build the debug version while WX_DEBUG=0 wouldn't.

Hope this makes sense...

mill-j thanks a lot, now I'll check!


___________________________________________

EDIT: If i open with admin permissions visual studio prompt and write :
" c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools> make-fC:\Users\Jack\Desktop\wxFreeChart\wxFreeChart-master\build\makefile.vc WX_DIR=C:\wxWidgets WX_UNICODE=1 ecc" I fall into a syntax error (now I don't have the makefile alone, but there is
its whole path)

Re: 2D-Plots

Posted: Thu Jul 05, 2018 3:46 pm
by doublemax
EDIT: If i open with admin permissions visual studio prompt and write :
" c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools> make-fC:\Users\Jack\Desktop\wxFreeChart\wxFreeChart-master\build\makefile.vc WX_DIR=C:\wxWidgets WX_UNICODE=1 ecc" I fall into a syntax error (now I don't have the makefile alone, but there is
No.

Please do exactly as people tell you.
- open VS command prompt
- cd to C:\Users\Jack\Desktop\wxFreeChart\wxFreeChart-master\build\

Use this command, but replace the directory "c:\path\to\my\wxWidgets" to the one on your system

Code: Select all

nmake -fmakefile.vc WX_DIR=c:\path\to\my\wxWidgets WX_UNICODE=1 WX_DEBUG=1 WX_SHARED=0 WX_MONOLITHIC=0
Admin mode should not be necessary.

BTW: There are also VS solution files in that directory. For these you only need to the the environement variable WXWIN to the path to your wxWidgets version.

Re: 2D-Plots

Posted: Thu Jul 05, 2018 4:01 pm
by doublemax
BTW: When i tested it myself, i noticed that the wxWidgets version in the makefile defaults to 2.8. If you use 3.0.x or 3.1.x you need to add nother parameter to the command line. WX_VERSION=30 or WX_VERSION=31 respectively.