?
Solved

simple graphic presentation in unix

Posted on 2002-05-15
10
Medium Priority
?
290 Views
Last Modified: 2010-04-21
hi .

I have a numerical file with numbers from 0 up to Max
cnt(0) = number of 0 at file
cnt(1) = num of 1 at file
...
cnt(Max) = num of Max ot file

example
I have this file :
1 3 5 1 3 4 7 4 2 4 5 6 7 8 9 2 3 4 5 6 2 3 4 3 4 5
cnt() = {0 2 3 5 6 5 2 2 1 1}

sum(cnt) = number of elements in file .

I WANT to view VERY SIMPLE graph on cnt()

I used to pass the file to matlab , but I have no matlab
today , and it is not very easy for me to pass the data
to excel to something like that ,

IS THERE ANY WAY , OF VIEWING VISUALL GRAPH ?

it can be also a charecteristic graph :

example :

|
|        
|         *
|      *    *
|        * *   *
|     *       *
|   *            *
| *                *
___________________________


thanks

tal
0
Comment
Question by:Talmash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 5

Expert Comment

by:ecw
ID: 7011475
man graph

0
 
LVL 6

Author Comment

by:Talmash
ID: 7013297
ecw :

I got Neither graph command NOR man graph
0
 
LVL 5

Expert Comment

by:ecw
ID: 7013319
which Unix are you using?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 40

Expert Comment

by:jlevie
ID: 7014420
gnuplot?
0
 
LVL 6

Author Comment

by:Talmash
ID: 7019375
ecw :

sorry , I changed the terminla from a linux to solaris .

I DO got the graph man .

I'll try operate it as soon as I'll have time for reading
it .
can you send me a short exaample , before starting ?


tnx, tal


jlevie :

gnu<tab>
gnuattach gnuclient gnudoit

no gnuplot
0
 
LVL 5

Expert Comment

by:ecw
ID: 7020372
Soryy, forgot to mention all the other stuff you need- plot (or tplot), and for fun spline and xterms Tek window (bottom of middle button menu).

Graph expects to begin a list of pairs, it will join these up with line.  Now I don't understand how cnt in your example relates to the first line of numbers, explain that, and maybe we could come up with a bit of awk to reformat the stuff for graph.

That aside, graph pumps out commands to drive plot (and tplot).  so for the kind of output above, use

echo 0 0 10 10 20 15 30 10 40 0 | graph | plot -Tdumb

to smooth the lines a bit, chuck a spline in front of graph ie.

echo 0 0 10 10 20 15 30 10 40 0 |spline |graph |plot -Tdumb

better yet, fire up xterms Tek window, hit return to get a prompt, and ...

TERM=tek (echo 0 0 10 10 20 15 30 10 40 0 |spline |graph |plot -T4014)

I've been using this for years to get a quick view of charts, way before everyone was forced to use Excel, and still do when I'm in the mood.  It's also the only use I've ever had for Tek emulation.
0
 
LVL 6

Author Comment

by:Talmash
ID: 7023348
ecw :

VERY nice !

I got very primitive graphs using "graph" ,
but the TEK window didn't worked as well .
this error I was received :

TERM = tek ( echo 0 0 10 10 20 15 30 10 40 0 | spline | graph | plot -T4014)
Badly placed ()'s.

from both TEK and regular terminals ,
maybe I didn't activated something etc ...

Tal
0
 
LVL 5

Accepted Solution

by:
ecw earned 630 total points
ID: 7023433
Are you using csh?  I've avoided csh since ksh became widespread, so taht's what I tend to think in.  If csh,

setenv TERM tek
echo 0 0 10 10 20 15 30 10 40 0 | spline | graph | plot -T4014

afterwards set TERM back to xterm
0
 
LVL 21

Expert Comment

by:tfewster
ID: 7921117
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by ecw

Please leave any comments here within the next 7 days

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
0
 
LVL 6

Author Comment

by:Talmash
ID: 7924905
thanks and sorry for the delay .

I think I left the idea to present grafic data behind .

it's now much easier , to convert from unix to pc , and use
excel instead .

tal
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question