[Kst] [EXTERNAL] Problem using KST from Command Line

David McMinn David.McMinn at halliburton.com
Wed Apr 22 14:40:03 UTC 2015


Hi Roger,

I'm not sure I can explain it any more but I'll try - it sounds like your usage is more advanced than mine. I was pointing out that if you modify the default settings for the ASCII datasource (that is what loads an ASCII file, it is separate from the Data Wizard) that it can prevent the data being loaded from the command line (which I got caught out with). It sounds like you've already experimented with that a lot, more than me.

I use KST in two different scenarios. One mainly from the GUI and one from the command line (I'm using Windows BTW, but KST should behave the same). When working from the GUI I tend to work with files which have a header and the column titles start in line 11 and the data in row 12. One time I decided to save myself some time and when I created the vector from my data file I set it up for names on line 11 and data on line 12 and ticked the "Apply these settings as default" option.

When using from the command line I have an application that generates data to a file which has the column header in line 1 and data starts on line 2. When I started using this application after changing the defaults in the ASCII datasource as above the plots were created but remained empty and no data was loaded from the file - this sounded like your original description of the problem so I thought I'd point out another avenue that Barth did not mention.

As you have already discovered the command line is much more rudimentary and only seems to allow specifying some values such as filename, number of points and X/Y column, labels.

That hack seems to be the quickest way to do it but it is less than ideal. Another option would be for your application to generate a tailored .kst file for the user's selections and load that from the command line but that seems like a lot of work.

You might be able to achieve more with the Python interface but it's not something I know anything about although I've seen it mentioned on the list.

Sorry I couldn't be more help.
Best regards,
David.

-----Original Message-----
From: Kst [mailto:kst-bounces at kde.org] On Behalf Of Roger Wehage
Sent: 22 April 2015 14:17
To: kst at kde.org
Subject: Re: [Kst] [EXTERNAL] Problem using KST from Command Line

Hi David,

Can you explain this a bit more? I’m trying to generate plots from the command line without using a .kst file. Since I’m using the precompiled kst binary inside the kst2.app installed from the downloaded kst2.dmg, I assume that the binary was compiled with predefined default settings for Data Manager and Data Wizard. What I know is that the settings in Data Wizard when I launch kst though the kst2.app are:

Apply these settings as default is not checked Data starts at line: 2 Read field names from line: 1 is checked Read units from line: 1 is not checked Decimal Separator: is set to Dot Space/tab delimited is selected Interpret empty value as: Zero is selected

Other settings, some of which I had set in previous sessions, are

Curve Placement: 1 new plot per curve
Plot Layout: Custom grid Columns: 3
Plot Placement (Tabs): All in current tab is selected
Labels: Rescale all labels on tab is checked
Legends: Auto is selected
Curve Style: Lines only

I don’t know if some or all of these settings become the default for command-line execution or if they revert back to defaults set when the kst binary was created. I’m guessing that any of my changes from factory defaults do not apply for command-line execution. From the KST Command Line Usage most of these settings cannot be changed through options. And I know that at least one of the above settings do not apply when I invoke kst from the command line. For example, I have set Plot Layout: Custom grid Columns: 3 but I get only one column for any number of plots from the command line.

Also I have found that at least one Kst Settings in Preferences… does not work as I would expect. Preferences should be remembered. I haven’t explored all of them, but under Scaling the default Reference view size: the default is A4. When I set it to Letter I would expect my preference to be Letter the next time I launch kst. But when I relaunch kst it has been set back to A4, which means that my preference was not remembered.

So I’m not sure what most kst settings are when called from the command line or how to change them if I wanted to. It would be nice to set up and save a kst configuration file from within the kst GUI using Data Manager and Data Wizard and then append this configuration file to the command line. I know that a .kst file already does something along these lines, but it is too rigid. Having to set up a different .kst file in the GUI for potentially thousands of variations that I envision defeats the purpose of the command-line feature.

Let’s take this simple example. I have a file containing 100 channels. The user wants to plot 15 of those channels in three columns. Which 15 channels does she want and in what order? Take your pick. She wants to plot any 15 of those channels in any order. How many combinations is that? So how would I implement this from the command line? Right now I know of only one way, and it’s a hack. In the GUI I set up a .kst file to generate 15 plots in three columns for the first fifteen channels, say c01 through c15, exactly as I want her to see them. When she runs this .kst file from the command line she will see plots of the first fifteen channels by rows in the 5 by 3 grid, which is likely not what she wants.

So what is the hack? Through my GUI she will select any 15 channels from my channels list in any order. Then my program will temporarily permute channel headings in the data file so that c01 through c15 appear above the 15 channels in the order she selected them. Since I had set up the .kst file to look for channels c01 through c15 in that order, it will find and plot her 15 channels in the order she selected.

Best regards,

Roger

> On Apr 22, 2015, at 2:03 AM, David McMinn <David.McMinn at halliburton.com> wrote:
> 
> Hi Roger,
> 
> Another thing to check would be whether you have change the default ASCII loader settings. I had the same issue and it was because I had defaulted my ASCII loader to expect a different column separator and line number to read column names from.
> 
> David.
> 
> 
> ----------------------------------------------------------------------
> This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst

Roger Wehage
raw915 at gmail.com
I prefer to use encrypted email.
My public key fingerprint is 2FC0 7616 DDB6 6B42 FF9C 775A FAEF DF7B 266E DB80.
Learn how to encrypt your email with the Email Self Defense guide (https://emailselfdefense.fsf.org/).



_______________________________________________
Kst mailing list
Kst at kde.org
https://mail.kde.org/mailman/listinfo/kst


More information about the Kst mailing list