On 08. nov. 2011 17:54, Spyros Stathopoulos wrote:
The problem is not with pgfplots but with the data file. It seems that LyX cannot reference files that are mentioned in ERT using relative paths. It arises because LyX does not copy the required file over at the temporary build directory, since ERT code is injected verbatim to the produced TeX source. It would also like to know if there is a solution for this problem without resorting to absolute paths.
The best solution would be some kind of support for pgfplots in LyX. LyX already figures out files included by other means than ERT, such as a chain of LyX files including each other. You may want to file a "wishlist bug", (or possibly start working on this.) Helge Hafting