creating graphs from values

March 9, 2010 at 09:35:51
Specs: Windows XP

Is there a program for windows or DOS, that can
generate a graph like this:

into an image file (.bmp, .jpg, etc.) ? It will has to do the

I have a file (generated by a batch program) with values.
The file looks like this:


(these mean percents, so they are between 0 and 100)

So i need a program, which can be called from a batch
file to generate a graph from the values specified in a file,
into a picture. Is that possible ?

See More: creating graphs from values

Report •

March 9, 2010 at 12:50:47
To draw a function you need to specify a relation that binds y and x, i.e. y=f(x). Assuming your file holds the y values what is the x variable?

More, you say the values are percentages, but the graphic you posted has nothing to do with statistic diagrams or distribution functions.

Please, specify better your needs.

Report •

March 9, 2010 at 14:29:16
The graph i have posted is just an example, on how a graph
looks like. The numbers and everything will be different.

I know it needs a value for X and a value for Y, but if i have eg. 50
values, the number of the value can be X. So eg.:

1st value in the file is 3.467, 2nd value in the file is 23.345 etc.

then x and y will be: (1;3.467) , (2;23.345)

Report •

March 9, 2010 at 15:25:44
it would be hard to get both the resolution and the scope into one graph (ie: numbers like 1.4398 to 99.8765432)
most graphs have to compromise on either resolution (definition) or scale (range). kind of like zooming in/out on a map or a picture, you either get a detailed view of small or you get a general view of large.
this script will make a graph:
@echo off & setlocal enabledelayedexpansion
:: the foll. is char. 219 (hex Db) used for "graphic"
set blok=Û
set /a cnt=0
for /f %%a in (data) do (
set /a cnt+=1
set /a xx!cnt!=%%a 2>nul
for /L %%b in (100 -1 0) do (
set out= %%b
set out=!out:~-3!
for /L %%a in (1 1 !cnt!) do (
if !xx%%a! geq %%b (set out=!out!!blok!) else (set out=!out! )
::----- end
but it will scroll off the screen the way it is now.
(it can of course be piped > text file)
To convert to an image file, you probably need PaintShop Pro, adobe photoshop, or any screen-capture-to-graphic utility. I'm not sure i could rig it up to create .jpg or .bmp directly from the commandline although i'm sure it's possible.
excel and/or other tools can be use to do a better job of generating graphs from data (espically line graphs).

Report •
Related Solutions

Ask Question