Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visualization depends on doesn't work with table from pgfplotstable #109

Closed
pgf-tikz-bot opened this issue Feb 18, 2016 · 9 comments
Closed

Comments

@pgf-tikz-bot
Copy link
Collaborator

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/109/
Author: u_fischer
Timestamp: 2016-02-18 15:12:09.567000

In the following example the first tikzpicture/axis, which loads the data from a temporary output file, works perfectly, but the second, which uses the \data macro, fails on a current texlive 2015 with ! Missing $ inserted.

\documentclass[10pt,a4paper]{report}
\usepackage{pgfplots}
\pgfplotsset{compat=1.13}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstableread[col sep=space]{
x y w1 w2
1 1 2 4
2 2 1 3
3 3 4 2
4 4 3 1
}\data

\pgfplotstablesave{\data}{pgfplotstempout.dat}

\begin{tikzpicture}
\begin{axis}[]
\addplot[
    scatter,
    only marks,
    scatter src=explicit,
    visualization depends on=\thisrow{w2}\as\wtwo,
    scatter/@pre marker code/.append style={
        /tikz/mark size=\wtwo
    }
]
table[x=x,y=y,meta=w1]{pgfplotstempout.dat};
\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
\begin{axis}[]
\addplot[
    scatter,
    only marks,
    scatter src=explicit,
    visualization depends on=\thisrow{w2}\as\wtwo,
    scatter/@pre marker code/.append style={
        /tikz/mark size=\wtwo
    }
]
table[x=x,y=y,meta=w1]{\data}; %error
\end{axis}
\end{tikzpicture}


\end{document}
@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/109/#b720
Author: mo-gul
Timestamp: 2017-03-04 12:16:23.359000

Does the answer of Symbol 1 give a possible hint to an implementation of a solution? http://tex.stackexchange.com/a/356790/95441

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/109/#0ea3
Author: mo-gul
Timestamp: 2017-10-11 11:46:55.142000

The bug is also reported at

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/109/#bdf5
Author: flomile
Timestamp: 2017-10-12 14:36:12.512000

The problem with pgfplotstableread is not constrained to visualization depends on. There also is a problem with matrix plot when data is stored in a pgfplotstable. I've added an example to https://tex.stackexchange.com/q/395573

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/109/#893e
Author: cfeuersaenger
Timestamp: 2017-11-10 16:35:29.511000

The reason why loaded tables are different (and, in some aspects, more difficult) is that TeX is so awkward when it comes to data structures: it is unable to make random access into a table... (unless one uses extreme ammounts of memory).

I found a solution which solves

visualization depends on=\thisrow{w2}\as\wtwo,

It will spit out an error for

visualization depends on=value \thisrow{w2}\as\wtwo,

but it is a major improvement such that I consider this bug fixed.

I will file a separate follow-up ticket for the issue reported by Florian; it seems to be unrelated.

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/109/#8da3
Author: cfeuersaenger
Timestamp: 2017-11-10 16:37:09.258000

see https://sourceforge.net/p/pgfplots/bugs/192/

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/109/#7eac
Author: cfeuersaenger
Timestamp: 2017-11-10 16:37:21.359000

  • status: open --> pending

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/109/#edf0
Author: cfeuersaenger
Timestamp: 2017-11-12 13:36:04.790000

The issue is improved to some extend: numeric values can now be processed. But the following is still impossible:

  • \addplot[x filter/.code={\ifdim\thisrow{...} = ...}] table {\data};
  • \thisrow for string columns

We decided to keep it this way for now and address the remaining open issues in a dedicated follow-up ticket of lower prio

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/109/#3f31
Author: cfeuersaenger
Timestamp: 2017-11-12 13:39:18.843000

https://sourceforge.net/p/pgfplots/bugs/193/

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/109/#1cd6
Author: cfeuersaenger
Timestamp: 2017-11-12 13:39:26.808000

  • status: pending --> closed-fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant