Re: [NTG-context] Pgfplots - passing point coordinates by Lua

2014-02-16 Thread Jaroslav Hajtmar
Thanks Jorge for the helpful and useful instructions. Sometimes it will certainly come in handy. Jaroslav Hajtmar Dne 17.2.2014 0:53, DesdeChaves napsal(a): \usemodule[tikz] \usemodule[pgfplots] \usemodule[pgfplotstable] \starttext \startluacode local dados={}; for i=1,10 do dados[i]=2*i

Re: [NTG-context] Pgfplots - passing point coordinates by Lua

2014-02-16 Thread DesdeChaves
Try this way: \usemodule[tikz] \usemodule[pgfplots] \usemodule[pgfplotstable] \starttext \startluacode local dados={}; for i=1,10 do dados[i]=2*i end context("\\starttikzpicture") context("\\pgfplotsset{width=10cm, compat=1.3, legend style={font=\\tfx}}") context("\\startaxis[") c

Re: [NTG-context] Pgfplots - passing point coordinates by Lua

2014-02-16 Thread Jaroslav Hajtmar
Hi Lukas. A year ago, I tried something similar when I wanted to make an animated pdf images. With using Lua, I can not handle eventually, but for inspiration attach a piece of code that demonstrates how get into buffer some parameters without Lua code. Maybe it inspires you in your solution.

Re: [NTG-context] Pgfplots - passing point coordinates by Lua

2014-02-16 Thread Herbert Voss
Am 16.02.2014 21:39, schrieb Lukáš Procházka: \startluacode data = {{5, 15}, {20, 20}, {24, -24}} data2crds = function(data) local str for i, v in ipairs(data) do str = (str or "") .. "(" .. v[1] .. "," .. v[2] .. ")" end print("Crds=", str) return str end

Re: [NTG-context] Pgfplots - passing point coordinates by Lua

2014-02-16 Thread Lukáš Procházka
Hello Herbert, On Sun, 16 Feb 2014 20:32:11 +0100, Herbert Voss wrote: As far as I know \addplot scans the coordinates in a way that a macro is not possible here . However, write your coodinates into an external file and read it with I was aware of this solution; however, I was looking for

Re: [NTG-context] Pgfplots - passing point coordinates by Lua

2014-02-16 Thread Herbert Voss
Am 15.02.2014 20:38, schrieb Lukáš Procházka: ... fonts > fallback modern rm 12pt is loaded Crds= (5,15)(20,20)(24,-24) Package pgfplots: Error! Sorry, I could not read the plot coordinates near '(5,15)(20,20)(24,-24)'. Please check for format mistakes. ! Package pgfplots Warning: th

[NTG-context] Pgfplots - passing point coordinates by Lua

2014-02-15 Thread Lukáš Procházka
Hello, I just started experimenting with pgfplots package. I'd have two questions: 1) When plotting/loading a data file: Is it possible to specify the comment mark, which is '#' and '%" by default? I'd need to treat ';' as a comment mark, too. 2) How to pass coordinates of plot points by Lua?