[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: KChart usage
From: Jonathan <j.e.drews () worldnet ! att ! net>
Date: 2001-12-11 2:52:29
[Download RAW message or body]
On Monday 10 December 2001 10:29, Tim Underwood wrote:
> I would like to use KChart from another package, and either pass a text
> data file, or parameters on the command line to perform plotting outside of
> my application. Can't find any documentation dealing with this, and it
> appears that the file(s) KChart uses are binary.
>
> So, can how can I use KChart from an external application (possibly even a
> shell script), and have it graph the data I pass it?
I don't know how to use Kchart but the following might help:
Using KPL (a KDE graphing application):
If you are using Kspread, arrange the spreadsheet so that the x and y data
are in columns A and B. Save the spreadsheet as a comma separated file
(*.csv). Drag and drop the file onto KPL. Then just print it out. For an
ordinary ascii file, with the x and y data in columns, the same procedure
works. Just drag and drop the file onto KPL. Note: it might be more
convenient to save the file as an *.eps and then embed it in a Kword doc.
This way you can alter it's size. You can also save the file as a data.ps and
then print it out with the Xterm command lpr data.ps.
With Kspread, KPL will only attempt to access dat from column A on. All the
other input in your *.csv file will be ignored. KPL can also do multiple
plots very nicely.
Info on Kpl here: http://frsl06.physik.uni-freiburg.de/privat/stille/kpl/
Using Gnuplot:
at the xterm type 'gnuplot'. Then if your data is in a file called plot.dat
do:
gnuplot> plot "data.dat" title "Plot Name" with lines
gnuplot> set terminal postscript
Terminal type set to 'postscript'
Options are 'landscape noenhanced monochrome dashed defaultplex "Helvetica"
14'
gnuplot> set output "plotdata.ps"
gnuplot> replot
gnuplot> set terminal X11 //Resets plotting to X
Terminal type set to 'X11'
Options are '0'
Then do lpr plotdata.ps (at the Xterm)
You can also create a *.png file in the same way. The *.png file can then be
included in Kword or Kontour, so you can alter it's position and size. This
is (IMHO) the easiest way to manipulate the plotted data.
gnuplot> set terminal png
Terminal type set to 'png'
Options are ' small color'
gnuplot> set output "plotdata.png"
gnuplot> replot
gnuplot> set terminal X11
Terminal type set to 'X11'
Options are '0'
Good short tutorial on using Gnuplot here:
http://www.cs.uni.edu/Help/gnuplot/TOC.html
HTH.
--
Cheers,
Jonathan
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic