On 1/7/2026 10:01 PM, Jeong Dal via ntg-context wrote:
Hi,
I made a list of 4-dimensional vectors using the following code.
\startluacode
local matT = {{0,0,1,1/3},{1,0,0,1/3},{0,1/2,0,1/3},{0,1/2,0,0}}
local matOld = {{1/4},{1/4},{1/4},{1/4}}
local matNew = {}
local matHistory = {}
table.insert(matHistory, matOld)
for i = 2, 15 do
matOld = matHistory[i-1]
matNew = mtx.product(matT, matOld)
-- mtx.typeset(matT)context("\\times")mtx.typeset(matOld)
-- context(" = ") mtx.typeset(matNew) context("\\blank")
table.insert(matHistory, matNew)
end
\stopluacode
I’d like to draw a line graph of the data in matHistory to show the
change of each component of 4-dimensional vectors.
How can I draw it in LuaMetaFun?
In the manual, data is already given in the example.
which example are you referring to
How can bring the data made in lua to ConTeXt?
userdata.yourdata = matHistory
and then access that with lua calls
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________