add support for "matrix-like" input for 3D data
Brought to you by:
cfeuersaenger,
ludewich
As is requested in https://tex.stackexchange.com/q/411110/95441 it would be nice if PGFPlots would support matrix-like input of 3D data.
Other related questions:
- https://tex.stackexchange.com/q/419043/95441
- https://tex.stackexchange.com/q/198639/95441
- https://tex.stackexchange.com/q/430451/95441
- https://tex.stackexchange.com/q/501319/95441
Faekynn provided some solutions of the problems e.g. https://tex.stackexchange.com/a/502680/95441 using Lua code. Maybe this can be generalized and implemented?
The solution on stackexchange is more suited for the particular problem there.
Things to consider in a more general case (please add your suggestions):
- there may (or may not) be a first row with y values
- there may be zero, one or several columns with x values
- without x or y values, there is just a plain z matrix
- not only a z matrix, but a second one for point-meta values
- custom comment chars
- custom table delimiters
- extracting mesh cols and mesh rows from the matrix
I will try to implement it in the next couple of days. Afterwards, I might look into the pgfplots code and see if I am able to understand it well enough.
A short update is there. Arbitrary numbers of different x/y data are now possible. At least one row of x values have to be present at the moment. Table delimiters are customizable (but I am not really sure about the lua pattern-matching syntax. Somehow, it is different for semicolons and whitespaces).
I am not sure how to handle a separate matrix for point-meta values correctly since I have no idea of a suitable format. Maybe this point is not that important.
Can you give me a hint where to look in the pgfplots code?
Sounds great. Unfortunately I don't have a clue about (PGFPlots) code. But I already contacted Christian who hopefully will have a look in the near future ...