[Kst] plot all columns from command line and some more newbiequestions

Andrew Walker arwalker at sumusltd.com
Thu Apr 1 19:27:24 CEST 2010


Hi Fabian,

There are some examples in the documentation:

http://kst.kde.org/handbook/index.html

and scroll to the very bottom of the page.
There are some dozen or so examples of using scripting.

Let us know if you have any specific questions or the documentation would 
benefit from a particular example.

For the datasource and scripting, you can do something like the following:

ds = new DataSource("some/file.txt")                // the name of your data 
file
ds.setConfiguration("customdelimiter", " )(")
v = new DataVector(ds, "1")                            // the column number 
of interest

Alternatively, the following should also work:

Open the Data Wizard
Select your file
Click Configure...
In the "Data Format" group click on "Custom delimiter"
Enter " )(" [without the quotes] in the corresponding edit field
Shutdown kst
Load your file from the command line (the settings are remembered across 
sessions)

Hope that helps,

Andrew

----- Original Message ----- 
From: "Fabian Braennstroem" <f.braennstroem at gmx.de>
To: <kst at kde.org>
Sent: Thursday, April 01, 2010 5:27 AM
Subject: [Kst] plot all columns from command line and some more 
newbiequestions


> Hi,
>
> I am new to kst and would like to plot all existing columns in an ascii
> file using the commandline.
>
> kst -y 2 -y3 file
>
> works well, but this is quite hard, if you have around 40 columns!?
>
> In addition, I took a first look at the scripting. As I am more familiar
> with python/scipy, I wonder, if there are some more example, which read
> data files, manipulate/calculate some columns using the scripting!?
>
> Another question... I have a lot of data files with the following 
> structure:
>
> # Time Vector-Pos1 VectorPos2
> 0 (1 1 1) (21.0 2.0 0.0)
> 1 (1 1 1) (21.0 2.0 0.0)
> 2 (1 1 1) (21.0 2.0 0.0)
> 3 (1 1 1) (21.0 2.0 0.0)
>
> Is it possible to tell kst using the command line and/or script to
> neglect the parenthesis?
>
> Would be really nice if you have some hints!
>
> Best Regards!
> Fabian
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
>



More information about the Kst mailing list