Solved

simple graphic presentation in unix

Posted on 2002-05-15
10
286 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 210 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

691 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