J Engine within Kdb+

Hi everyone,i tried to use jq as a engine within kdb+ because i am interested inthe plotting fucntions available in jsoftware.Unfortunately the example provided from the cookbook is only availablefor linux/unix system.So my question is the following:Is there an example available for windows?Another question related to this issue is how do you plot datapointsin kdb?What i did so far is using matlab to retrieve the data and plottingfunctions within matlab. But if it is possible i would like to staywihin kdb+.Thx for any comments.Regards,Kim

Hi kuentang,

Jq is a pure J library for J program run as a kdb+ client via TCP/IP
socket,so it runs ok at whatever platform J can run.

Qj is a c extension of kdb+ to call J engine within kdb+,so it must be
recompiled at the platform where kdb+ runs,you can just download my
win32 build:https://itfin.3322.org/pub/qjfe.dll ,and put it in your
kdb+'s w32 dir.Then you can try:

q)\l qj.q
q)initj[“C:\j602\bin”]; //change to your J’s bin dir.
q)jedo “load ‘plot’”;
q)jemv[“plot”] 100?1f;
q).q.plot:jedv[“plot”];
q)“type bar” plot 10?1f;

Another choice is use my gnuplot
wrapper:https://code.kx.com/trac/browser/contrib/zuoqianxu/qgnuplot/gnuplot.q
,which is a pure q script.
It assumes c:\tmp exist and gnuplot.exe exist in c:\bin\ ,you must
install gnuplot for windows first.You can also change the script for
your true path.
then pl 10?1f or pl (til 10;10?1f) will plot the line.

thanks.
zuoqian

2011/8/6 kuentang :
>
> Hi everyone,
>
> i tried to use jq as a engine within kdb+ because i am interested in
> the plotting fucntions available in jsoftware.
>
> Unfortunately the example provided from the cookbook is only available
> for linux/unix system.
> So my question is the following:
>
> Is there an example available for windows?
>
> Another question related to this issue is how do you plot datapoints
> in kdb?
>
> What i did so far is using matlab to retrieve the data and plotting
> functions within matlab. But if it is possible i would like to stay
> wihin kdb+.
>
> Thx for any comments.
>
> Regards,
>
> Kim
>
> –
>

Submitted via Google Groups

Hi Zuoqian,

thanks for your reply.

Am 06.08.2011 15:20, schrieb Xu Zuoqian:
> Hi kuentang,
>
> Jq is a pure J library for J program run as a kdb+ client via TCP/IP
> socket,so it runs ok at whatever platform J can run.
>
> Qj is a c extension of kdb+ to call J engine within kdb+,so it must be
> recompiled at the platform where kdb+ runs,you can just download my
> win32 build:https://itfin.3322.org/pub/qjfe.dll ,and put it in your
> kdb+'s w32 dir.Then you can try:
>
> q)\l qj.q
> q)initj[“C:\j602\bin”]; //change to your J’s bin dir.
> q)jedo “load ‘plot’”;
> q)jemv[“plot”] 100?1f;
> q).q.plot:jedv[“plot”];
> q)“type bar” plot 10?1f;
>
> Another choice is use my gnuplot
> wrapper:https://code.kx.com/trac/browser/contrib/zuoqianxu/qgnuplot/gnuplot.q

Great work. I try your script gnuplot.q with the latest gnuplot. But
unfortunately it is not working on windows32.
i change the path from

$[isWIN;“start \bin\gnuplot”;"gnuplot "] to
$[isWIN;"start \bin\gnuplot\binary\gnuplot.exe ";"gnuplot "]

Now i am able to plot lines.

But everytime when i use the command pl a new instance of gnuplot is
created.

Kim
> ,which is a pure q script.
> It assumes c:\tmp exist and gnuplot.exe exist in c:\bin\ ,you must
> install gnuplot for windows first.You can also change the script for
> your true path.
> then pl 10?1f or pl (til 10;10?1f) will plot the line.
>
> thanks.
> zuoqian
>
> 2011/8/6 kuentang:
>> Hi everyone,
>>
>> i tried to use jq as a engine within kdb+ because i am interested in
>> the plotting fucntions available in jsoftware.
>>
>> Unfortunately the example provided from the cookbook is only available
>> for linux/unix system.
>> So my question is the following:
>>
>> Is there an example available for windows?
>>
>> Another question related to this issue is how do you plot datapoints
>> in kdb?
>>
>> What i did so far is using matlab to retrieve the data and plotting
>> functions within matlab. But if it is possible i would like to stay
>> wihin kdb+.
>>
>> Thx for any comments.
>>
>> Regards,
>>
>> Kim
>>
>> –
>>

Submitted via Google Groups