diff --git a/Project.toml b/Project.toml index 90acdb4cdd0215a495950d7df8fccce021ca49b5..d76db9eec57324b01943f84fe1ea8394e4face4b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,8 +1,9 @@ -name = "JuliaTikz" +name = "JuliaTikzModule" uuid = "9c98e656-dfbc-11ea-2f36-4b421b45bbac" authors = ["Leif Andersson <leif.andersson@control.lth.se>"] version = "0.1.0" [deps] Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" - +ControlSystems = "a6e380b2-a6ca-5380-bf3e-84a91bcd477e" +Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" diff --git a/README.md b/README.md index 55721848c1b90eeacbef6a977fef6d043fd37985..261865ede4ec5970c837714c0fea356b58f1e628 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,32 @@ -# JuliaTikz.jl +# JuliaTikzModule.jl -## Please note that the module is called JuliaTikzModule, -## because the system would not accept the same name for -## a module and a function in the module. +Enables Julia code and Tikz code to coexist in the same file. +### JuliaTikz + JuliaTikz(tikzfile,delete=true) + +Extract and run the Julia part of a combined tikz/Julia file. + +The boundary between the two is the string + + \\endinput Julia <name> + +where `<name>` is the name that will be given to the Julia file +(with .jl appended), and also to a variable `name` in the program, +i.e. name = "<name>". + +The Julia file will be extracted to a temporary directory, which will be +deleted after the run unless the optional argument `delete` is false. + +### printcsv + + printcsv(data::Array{Any}, csv="") + +Print the array `data` to a file suitable for inclusion in pgfplots. +The columns of `data` should have a string as first element, and Float64 +as the remaining elements. + +The default name of the file will be `<name>.csv`, where `<name>` is the value +of the global variable `name`, typically given by `JuliaTikz`. Another name may +be specified whith the second argument of `printcsv`. diff --git a/src/JuliaTikz.jl b/src/JuliaTikzModule.jl similarity index 100% rename from src/JuliaTikz.jl rename to src/JuliaTikzModule.jl