Asking for some help about Charts

For other topics related to the FreeBASIC project or its community.
Lost Zergling
Posts: 334
Joined: Dec 02, 2011 22:51
Location: France

Asking for some help about Charts

Postby Lost Zergling » Apr 18, 2016 13:55

Hi
Looking for easy good looking graphic charts, even static ones, I found this old post on forum wich seems to fit pretty well what I'm looking for : viewtopic.php?p=95976&highlight=#95976
Tried to use it & I got :
Command executed:
"D:\FreeBASIC\fbc.exe" "D:\FreeBASIC_1_00\ploticus\testploticus1.bas"
Compiler output:
.//libploticus.a(functions.o):functions.c:(.text+0xff8): undefined reference to `sleep'
.//libploticus.a(custom.o):custom.c:(.text+0x707): undefined reference to `sleep'
Results:
Compilation failed
System:
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 0.22.0 (05-06-2011) for win32 (target:win32)
OS: Windows NT 6.1 (build 7601, Service Pack 1)

All Includes alone compile ok, error is generated by this line :
stat = ploticus_init( "png", "testpl1.png" )
Posts says it is working fine,.., so Am I wrong somewhere ?
Tourist Trap
Posts: 2933
Joined: Jun 02, 2015 16:24

Re: Asking for some help about Charts

Postby Tourist Trap » Apr 18, 2016 14:40

FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 0.22.0 (05-06-2011) for win32 (target:win32)
OS: Windows NT 6.1 (build 7601, Service Pack 1)

About your question of charts, I don't know too much. Maybe DISLIN
viewtopic.php?f=14&t=23984&p=215500&hilit=dislin#p215500
http://www.mps.mpg.de/dislin/,
it's compatible with fb, I've not tested it but see link to topic.
However it seems that you've downloaded an old package where FBIDE comes with fb0.22. The current version of fb is 1.05, and you can download it from sourceforge. It is what I recommend first. You will still be able to use FBIDE after changing the path in the menu. And you don't have to erase the older compiler version in case you want to get it back later for some reason.
Lost Zergling
Posts: 334
Joined: Dec 02, 2011 22:51
Location: France

Re: Asking for some help about Charts

Postby Lost Zergling » Apr 18, 2016 15:37

Yes, I'm using an old package, but it's a more recent one than the post on FB-Ploticus. Thus I made a try with version 1.00 with no results. Ploticus is GPL & open source, Dislin is "Free for non commercial (understand "personnal") use". Thus i'm looking for pretty simple & easy looking business graph, Dislin is very scientific oriented, can do it of course, with much complications for results not pretty exactly inline with what i'm looking for. As I choose Ploticus, I may have to re-make my own c interface :-( not sure I'll do it. Did anyone succed in driving ploticus from FB was the thrue purpose of my question.
Zippy
Posts: 1295
Joined: Feb 10, 2006 18:05

Re: Asking for some help about Charts

Postby Zippy » Apr 18, 2016 18:18

I (just now) have haegar's examples running using fb Win32 v1.05 on 64-bit Windows. I had to roundup libz.a (from previous fb install), and copy haegar's libpng.dll to libpng12.dll. I don't think that your problem is with the fb version, albeit that's what I would try first (a newer version).

Very interesting. I was completely unaware of ploticus. Pretty cool.
.
Lost Zergling
Posts: 334
Joined: Dec 02, 2011 22:51
Location: France

Re: Asking for some help about Charts

Postby Lost Zergling » Apr 18, 2016 19:16

Thanks a lot, I know the routine is working. I'll make other try in win32. I will try with old libz.a version and trying to rename libpng.dll as well.
W32 is,.. "mandatory",.. ;-)
Zippy
Posts: 1295
Joined: Feb 10, 2006 18:05

Re: Asking for some help about Charts

Postby Zippy » Apr 18, 2016 19:51

My libz.a is 112,888 bytes, version unknown, filedate is probably meaningless but is 5/27/2014. I discovered this was missing during the compile. The libpng12.dll issue was an explicit runtime error; that the program couldn't "start" because it was missing. I did not encounter your specific error.

-----

There exists a Win32 Ploticus binary, pl.exe, here (originator of Ploticus):
http://www.gdsw.at/graphics/visual/plot ... nload.html

This too works on Win64. Cannot output png, only gif (and EPS...).
File creation date is October 4, 2001!
.
D.J.Peters
Posts: 8179
Joined: May 28, 2005 3:28
Contact:

Re: Asking for some help about Charts

Postby D.J.Peters » Apr 18, 2016 21:20

Do you know FLTK ?

Joshy
Image

Code: Select all

#include once "fltk-c.bi"

'test of:
' Fl_Chart           http://www.fltk.org/doc-1.3/classFl__Chart.html
' Fl_WidgetSetType
' Fl_ChartAdd

sub AddItems(byval chart as Fl_chart ptr)
  Fl_ChartAdd chart, 51.0,"on",1
  Fl_ChartAdd chart, 58.0,"50°",2
  Fl_ChartAdd chart, 61.0 ,"75°",3
  Fl_ChartAdd chart, 71.0 ,"100°",4
  Fl_ChartAdd chart, 96.0 ,"125°",5
  Fl_ChartAdd chart,117.0 ,"150°",6
  Fl_ChartAdd chart,140.0 ,"175°",7
  Fl_ChartAdd chart,155.0 ,"200°",8
  Fl_ChartAdd chart,180.0 ,"225°",9
  Fl_ChartAdd chart,206.0 ,"250°",10
end sub

dim as integer ww = 640
dim as integer hh = 480
dim as integer w = (ww-40) \ 3
dim as integer h = (hh-60) \ 2

var Win = Fl_WindowNew(ww,hh, "Fl_Chart")

var chart1 = Fl_ChartNew(10+w*0,10+h*0,w,h,"FL_CHART_BAR")
Fl_WidgetSetType chart1,FL_CHART_BAR : AddItems chart1

var chart2 = Fl_ChartNew(20+w*1,10+h*0,w,h,"FL_CHART_LINE")
Fl_WidgetSetType chart2,FL_CHART_LINE : AddItems chart2

var chart3 = Fl_ChartNew(30+w*2,10+h*0,w,h,"FL_CHART_FILL")
Fl_WidgetSetType chart3,FL_CHART_FILL : AddItems chart3

var chart4 = Fl_ChartNew(10+w*0,30+h*1,w,h,"FL_CHART_SPIKE")
Fl_WidgetSetType chart4,FL_CHART_SPIKE : AddItems chart4

var chart5 = Fl_ChartNew(30+w*2,30+h*1,w,h,"FL_CHART_PIE")
Fl_WidgetSetType chart5,FL_CHART_PIE : AddItems chart5

Fl_WindowShow Win
Fl_Run
Last edited by D.J.Peters on Sep 25, 2017 21:53, edited 1 time in total.
Lost Zergling
Posts: 334
Joined: Dec 02, 2011 22:51
Location: France

Re: Asking for some help about Charts

Postby Lost Zergling » Apr 18, 2016 23:07

Didn't see this site ! gdsw.at much more complete than the sourceforge one. Exec with doc & exemples : I can do a shell in a thread to launch it if never dll and .a doesn't work. Manual included. Great. I think the "spirit" of the three tools/products is different. FLTK is GUI oriented; as opposite Ploticus is batch & scripting oriented; Dislin is a prof high end product oriented to scientific skills work. I do not see theses products as competitors. If I want a small and quick presentation embedded in an interface (could be very usefull for some apps or for a preview) I'll probably choose FLTK, but for serious batch processing scripting and heavy datas and files management I may use a code of mine combined with ploticus launch from a thread I think, and if I was working on fluid mechanic, maths or something like that I suppose Dislin could perhaps be a pretty choice, doknow.
Lost Zergling
Posts: 334
Joined: Dec 02, 2011 22:51
Location: France

Re: Asking for some help about Charts

Postby Lost Zergling » Apr 19, 2016 14:05

Hi Peters,
I have developped a small tool but professionnal application using TinyDialog, checking the licence, nothing reported.
Given as freeware or beta demo for years or suppose to be, is it necessary to recode user interface with another GUI like FLTK (or smth else) or is it Ok using it ? I seek on google find nothing. With no mention of licence, may I write in my application : "Reported as freeware or demo" ? (for years)
A small worry about it, few work here but I prefer to recode GUI if necessary can't afford any risk with licence.
Yours Zerglingly.
Lost Zergling
Posts: 334
Joined: Dec 02, 2011 22:51
Location: France

Re: Asking for some help about Charts

Postby Lost Zergling » Apr 22, 2016 13:55

Hi Peters,
First, thanks a lot for response, and pardon me for "Zerglingly" :-)). I worried about because I founded this library so much professionnal-friendly despite it offers so simple functionnality compare to FTLK or wxFBE project or others. By prof-friendly I just mean easy, very RAD, no need graphic console, reported multi system,.. I just mean the style. This depends what you are looking for. Complexity or technicity standing alone does not make professionnal product or special style, but this is design. Terms of MIT licence are professional touch.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests