2D-Plots Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

2D-Plots

Post by wxJack » Thu Jul 05, 2018 10:53 am

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

User avatar
mill-j
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sat Jun 02, 2018 3:21 pm

Re: 2D-Plots

Post by mill-j » Thu Jul 05, 2018 1:04 pm

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.
[-X Don't Complain, Change It, It's Open-Source!

wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack » Thu Jul 05, 2018 1:48 pm

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!

wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack » Thu Jul 05, 2018 2:12 pm

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).

User avatar
doublemax
Moderator
Moderator
Posts: 15074
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 2D-Plots

Post by doublemax » Thu Jul 05, 2018 2:14 pm

Which compiler do you use? The command with "nmake" is only for Visual Studio.
Use the source, Luke!

wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack » Thu Jul 05, 2018 2:18 pm

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
Last edited by wxJack on Thu Jul 05, 2018 2:23 pm, edited 1 time in total.

User avatar
doublemax
Moderator
Moderator
Posts: 15074
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 2D-Plots

Post by doublemax » Thu Jul 05, 2018 2:23 pm

Did you open a Visual Studio command prompt? (It's in the Visual Studio start menu entry).
Use the source, Luke!

wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack » Thu Jul 05, 2018 2:29 pm

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)

User avatar
doublemax
Moderator
Moderator
Posts: 15074
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 2D-Plots

Post by doublemax » Thu Jul 05, 2018 2:50 pm

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.
Use the source, Luke!

wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack » Thu Jul 05, 2018 2:59 pm

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

User avatar
doublemax
Moderator
Moderator
Posts: 15074
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 2D-Plots

Post by doublemax » Thu Jul 05, 2018 3:01 pm

You have to navigate to where the makefile is (makefile.vc).
Use the source, Luke!

User avatar
mill-j
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sat Jun 02, 2018 3:21 pm

Re: 2D-Plots

Post by mill-j » Thu Jul 05, 2018 3:05 pm

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...
[-X Don't Complain, Change It, It's Open-Source!

wxJack
Experienced Solver
Experienced Solver
Posts: 83
Joined: Wed Jun 20, 2018 8:06 am

Re: 2D-Plots

Post by wxJack » Thu Jul 05, 2018 3:28 pm

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)

User avatar
doublemax
Moderator
Moderator
Posts: 15074
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 2D-Plots

Post by doublemax » Thu Jul 05, 2018 3:46 pm

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.
Use the source, Luke!

User avatar
doublemax
Moderator
Moderator
Posts: 15074
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 2D-Plots

Post by doublemax » Thu Jul 05, 2018 4:01 pm

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.
Use the source, Luke!

Post Reply