Christian Feuersaenger | 6 Oct 13:32 2010

Re: Skewed colour maps

Dear Shaun,

your issue with skewed axes came to my mind: two weeks ago, I finished a 
revision of the related interfaces.

As a consequence, the requested feature should not work. Attached you 
find the result of
\documentclass[a4paper]{article}

\usepackage{pgfplots}

\pgfplotsset{compat=newest}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
     x={(1cm,-0.5cm)},
     y=1cm,
     z=0cm,
     axis on top,
     ]
     \addplot3[surf,shader=interp] {x*y};
\end{axis}
\end{tikzpicture}
\end{document}

If I am not mistaken, the changes are part of the unstable TDS build 
available on the pgfplots homepage on sourceforge.

(Continue reading)

Stefan Schulze Frielinghaus | 10 Oct 22:16 2010
Picon

groupplot, legend outside of an axis and externalizing everything

Hi all,

I'm using groupplot because it is really easy to draw things like an
arrow between two plots. However, I also need to use the external
library. Now I tried to create a legend outside of an axis but this does
not work as long as I'm using the external library. Here is a minimal
example:

\documentclass{minimal}
\usepackage{pgfplots}

\usetikzlibrary{pgfplots.groupplots}

\pgfplotsset{compat=1.3}
%\usepgfplotslibrary{external}
%\tikzexternalize

\begin{document}
\centering
\begin{tikzpicture}
    \begin{groupplot}[group style={group size=2 by 1, horizontal sep=2cm}]
        \nextgroupplot[legend entries={a;,b},
                       legend to name=named,
                      ]
        \addplot {x};
        \addplot {x*x};
        \nextgroupplot[xmin=1, xmax=2]
        \addplot {x};
        \addplot {x*x};
    \end{groupplot}
(Continue reading)

Stefan Pinnow | 11 Oct 09:46 2010
Picon
Picon

Re: groupplot, legend outside of an axis and externalizing everything

Hello Stefan,

the problem has nothing to do with the groupplots. The error comes from the
"outside legend". Here my mimimal example showing the problem:

% ----- minimal example -----
\documentclass{minimal}
    \usepackage{pgfplots}
        \pgfplotsset{compat=newest}
        \usepgfplotslibrary{external}
            \tikzexternalize
\begin{document}
    \begin{tikzpicture}
        \begin{axis}[
            legend entries = a,
            legend to name = named,
        ]
            \addplot coordinates { (0,0) (1,1) };
        \end{axis}
    \end{tikzpicture} \\
        \tikzexternaldisable    % <-- comment me to show the error
    \ref{named}
        \tikzexternalenable
\end{document}
% ---------------------------

So to circumvent the problem for now you could just exclude the "outside
legends" from externalization as shown above until the problem is fixed.

Best regards
(Continue reading)

Christian Feuersänger | 11 Oct 11:03 2010

Re: groupplot, legend outside of an axis and externalizing everything

Hi Stefan,

your example can be externalized successfully.

It only requires a special way to do so: when I compile the document (it is called "P.tex") with
pdflatex -shell-escape P
I get

! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "P-figure_crossref0" "\def\tikzexternalrealjob{P}\input{P}"' did NOT result in a usable output file 'P-figure_crossref0' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in 'P-figure_crossref0.log'. If you continue now, I'll try to typeset the picture.

The file P-figure__crossref0.log contains more details:
! Package tikz Error: Sorry, image externalization failed: the resulting image was EMPTY. I tried to externalize 'P-figure_crossref0', but it seems there is no such image in the document!? 
   You are currently using 'mode=convert with system call'. This problem can happen if the image (or one of the images preceeding it) was declared inside of a \label{} (i.e. in the .aux file): 'convert with system call' has no access to the main aux file.
   Possible solutions in this case:
   a) Try using 'mode=list and make',
   b) Issue the externalization command 'pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "P-figure_crossref0" "\def\tikzexternalrealjob{P}\input{P}"' *manually* (also check the preceeding externalized images, perhaps the file name sequence is not correct).
   Repeat: the resulting image was EMPTY, your attention is required .

I chose to follow the advice of step (b), afterwards everything worked.

You can find background details concerning this stuff in the manual, Section 7 "Import/Export From Other Formats" in paragraph "Support for Labels and References In External Files". The tikz developer version manual also contains (perhaps even more detailed) information about the externalization.

The steps above rely on a recent pgfplots version (I used pgfplots 1.4.1 or, more precisely, the unstable dev version on top of it).

I hope this helps you. If not, it would help if you could post the log file(s) of your minimal example as well.

Best regards

Christian

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@...
https://lists.sourceforge.net/lists/listinfo/pgfplots-features
Stefan Schulze Frielinghaus | 11 Oct 15:16 2010
Picon

Re: groupplot, legend outside of an axis and externalizing everything

Hi Christian,

yeah I got the same error as you and I tried once doing step b) but
since I have to compile the document quite often this got frustrating
when I cleaned my environment once in a while ;-)

I guess for the moment I will use the trick which Stefan told me
(disabling and enabling externalization).

Thanks for your help. I will have a look at the manual section 7
(+ TikZ) for more insights.

Regards,
Stefan

On Mo, 2010-10-11 at 11:03 +0200, Christian Feuersänger wrote:
> Hi Stefan,
> 
> your example can be externalized successfully. 
> 
> It only requires a special way to do so: when I compile the document
> (it is called "P.tex") with
> pdflatex -shell-escape P
> I get
> 
> ! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape
> -halt-on-error -interaction=batchmode -jobname "P-figure_crossref0"
> "\def\tikzexternalrealjob{P}\input{P}"' did NOT result in a usable
> output file 'P-figure_crossref0' (expected one
> of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system
> calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is
> also named 'write 18' or something like that. Or maybe the command
> simply failed? Error messages can be found in
> 'P-figure_crossref0.log'. If you continue now, I'll try to typeset the
> picture.
> 
> The file P-figure__crossref0.log contains more details:
> ! Package tikz Error: Sorry, image externalization failed: the
> resulting image was EMPTY. I tried to externalize
> 'P-figure_crossref0', but it seems there is no such image in the
> document!?  
>    You are currently using 'mode=convert with system call'. This
> problem can happen if the image (or one of the images preceeding it)
> was declared inside of a \label{} (i.e. in the .aux file): 'convert
> with system call' has no access to the main aux file.
>    Possible solutions in this case:
>    a) Try using 'mode=list and make',
>    b) Issue the externalization command 'pdflatex -shell-escape
> -halt-on-error -interaction=batchmode -jobname "P-figure_crossref0"
> "\def\tikzexternalrealjob{P}\input{P}"' *manually* (also check the
> preceeding externalized images, perhaps the file name sequence is not
> correct).
>    Repeat: the resulting image was EMPTY, your attention is required .
> 
> I chose to follow the advice of step (b), afterwards everything
> worked.
> 
> You can find background details concerning this stuff in the manual,
> Section 7 "Import/Export From Other Formats" in paragraph "Support for
> Labels and References In External Files". The tikz developer version
> manual also contains (perhaps even more detailed) information about
> the externalization.
> 
> The steps above rely on a recent pgfplots version (I used pgfplots
> 1.4.1 or, more precisely, the unstable dev version on top of it).
> 
> I hope this helps you. If not, it would help if you could post the log
> file(s) of your minimal example as well.
> 
> Best regards
> 
> Christian 
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________ Pgfplots-features mailing list
Pgfplots-features <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pgfplots-features

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features
Stefan Schulze Frielinghaus | 11 Oct 15:18 2010
Picon

Re: groupplot, legend outside of an axis and externalizing everything

Hi Stefan,

the trick with enabling and disabling externalization works perfectly
fine. Thanks for your help!

Regards,
Stefan

On Mo, 2010-10-11 at 09:46 +0200, Stefan Pinnow wrote:
> Hello Stefan,
> 
> the problem has nothing to do with the groupplots. The error comes
from the
> "outside legend". Here my mimimal example showing the problem:
> 
> % ----- minimal example -----
> \documentclass{minimal}
>     \usepackage{pgfplots}
>         \pgfplotsset{compat=newest}
>         \usepgfplotslibrary{external}
>             \tikzexternalize
> \begin{document}
>     \begin{tikzpicture}
>         \begin{axis}[
>             legend entries = a,
>             legend to name = named,
>         ]
>             \addplot coordinates { (0,0) (1,1) };
>         \end{axis}
>     \end{tikzpicture} \\
>         \tikzexternaldisable    % <-- comment me to show the error
>     \ref{named}
>         \tikzexternalenable
> \end{document}
> % ---------------------------
> 
> So to circumvent the problem for now you could just exclude the
"outside
> legends" from externalization as shown above until the problem is
fixed.
> 
> 
> Best regards
> Stefan

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Christian Feuersänger | 11 Oct 15:28 2010

Re: groupplot, legend outside of an axis and externalizing everything

Hi Stefan,

its good to see that you found a satisfactory solution! I remember that you can use the preamble configuration

\pgfplotsset{
  invoke before crossref tikzpicture={\tikzexternaldisable},
  invoke after crossref tikzpicture={\tikzexternalenable},
}

to do that sort of thing *automatically*. The 'invoke before' - thing is invoked just before the \ref is resolved, and the 'after' thing directly afterwards.

Best regards

Christian

2010/10/11 Stefan Schulze Frielinghaus <stefan-1Hm3xKI8PE/k1uMJSBkQmQ@public.gmane.org>
Hi Stefan,

the trick with enabling and disabling externalization works perfectly
fine. Thanks for your help!

Regards,
Stefan

On Mo, 2010-10-11 at 09:46 +0200, Stefan Pinnow wrote:
> Hello Stefan,
>
> the problem has nothing to do with the groupplots. The error comes
from the
> "outside legend". Here my mimimal example showing the problem:
>
> % ----- minimal example -----
> \documentclass{minimal}
>     \usepackage{pgfplots}
>         \pgfplotsset{compat=newest}
>         \usepgfplotslibrary{external}
>             \tikzexternalize
> \begin{document}
>     \begin{tikzpicture}
>         \begin{axis}[
>             legend entries = a,
>             legend to name = named,
>         ]
>             \addplot coordinates { (0,0) (1,1) };
>         \end{axis}
>     \end{tikzpicture} \\
>         \tikzexternaldisable    % <-- comment me to show the error
>     \ref{named}
>         \tikzexternalenable
> \end{document}
> % ---------------------------
>
> So to circumvent the problem for now you could just exclude the
"outside
> legends" from externalization as shown above until the problem is
fixed.
>
>
> Best regards
> Stefan


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@...
https://lists.sourceforge.net/lists/listinfo/pgfplots-features
Joshua Smith | 13 Oct 12:48 2010
Picon

Pgfplots vs. PGF's data visualization library


On the pgf-users email list, it was announced that a new version of  
pgf would be released later this year, but without the DV library.   
Another curious user asked what the DV library is, and Stefan pointed  
to part V of the manual of the CVS version of PGF, which describes a  
data visualization library.

A lot of what is described seems to repeat functionality present in  
pgfplots.  Can anyone provide a brief, but more thorough comparison  
between pgfplots and what is being coded directly into pgf as the data  
visualization library?

Thanks,
Josh

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
Christian Feuersaenger | 20 Oct 22:16 2010

Re: Pgfplots vs. PGF's data visualization library

Dear Joshua,

I think I can try a preliminary comparison from my point of view.

Let me start with the state-of-the-art in PGF, which is probably known 
to you:

The actual PGF stable 2.00 has "data visualization" - namely the
  \draw plot ...;
paths which get data points and do some sort of visualization, depending 
on a 'plot handler'.
Clearly, this approach is rather limited in many aspects. For example, 
there is no real way to map input data to the canvas short of 
identifying input coordinates with canvas points (which means that you 
can't visualize something beyond +-16000).
Its accuracy is low, it has no way to draw axes automatically, it 
supports only up to three coordinates... and so on.

The pgfplots package separates the input data and the visualization by 
introducing a further survey phase in which limits are computed and 
transformations prepared. It then does a visualization phase in which 
the data is transformed and drawn onto the canvas, furthermore, an 
appropriate axis is drawn around it. The idea is: the user provides the 
data and pgfplots does the rest automatically, including axis 
descriptions or further options provided by the user.
However, until the next of pgfplots, the basic level interface of 
pgfplots is still that of the PGF 'plot handlers' (with some extensions 
like color data and additional error bar support). If someone wants to 
add a new plot handler, he can add a PGF plot handler and that one is 
automatically usable in pgfplots. This is sufficient for most 
visualizations, but try quiver plots - they need (x,y,z) and (u,v,w) and 
perhaps color (for every point). Quiver plots are implemented in the 
pgfplots unstable, but the basic level interface is no longer that of 
PGF 2.00 -- instead, it will become that of the PGF DV engine.

The PGF DV engine is an attempt to re-implement the whole process of 
data visualization on a basic level: it provides the aforementioned 
survey phase and the visualization phase directly and it provides 
extensible ways to input coordinates. You can already glimpse at these 
things when you browse through Till's preliminary documentation. Besides 
the basic level interface, it will also contain a high level interface 
to actually pack these things together.
Currently, the PGF DV engine has a systematic programmer's API together 
with its documentation, and documentation for high-level user interfaces 
will come when Till is ready.

Conceptionally, pgfplots aims at being a high-level tool. It provides 
user interfaces for data visualization, and it aims at describing how to 
use them and how to modify their parameters. In its current state, the 
DV engine is an application programmer interface. Tools like pgfplots 
can be implemented on top of it, using it without the user noticing that 
he does so. But if someone writes his own way to provide coordinates in 
terms of the DV engine, this tool can be used by all applications which 
use the DV engine as core. Similar aspects hold for new plot handlers: 
pgfplots is high-level, it provides various different pre-defined plot 
handlers and documents how to use them and how to modify parameters. If 
someone writes a new plot handler for the DV engine, and pgfplots 
supports the interfaces of the DV engine, you can directly use the new 
one as well.

The DV engine also supports (or will support when it is complete, 
compare the existing examples in the pgf manual) a high-level interface, 
including axes and axis styles. This repeats functionality of pgfplots 
(with a different user interface). Of course, these features will use 
the interfaces of the DV engine and its equivalent to "plot handlers", 
but it will use its own set of parameters, its own way to set them and 
its own way of actually drawing descriptions and axis lines. Thus, 
pgfplots and the pgf DV styles may both be on the same basic level 
interface, but they handle things differently and probably in an 
incompatible way. The user will have to decide which one he prefers.

Currently, the basic level interfaces of pgfplots are being refactored 
in preparation to the DV engine (and include already advanced 
visualization techniques like contour plots, quiver plots, histograms, 
or patch plots, compare the sourceforge website containing an unstable 
TDS build). When the DV engine comes, there are plans for an adapter 
between the pgfplots and pgf DV interfaces.

While (probably most of the) plot handlers and input types will be 
compatible in some way, the sets of supported features and the 
respective high-level user interfaces to display axes will be different 
as far as I can see from Till's high-level styles.

This is how I see the DV engine as it exists so far in relation to pgfplots.

Best regards

Christian

2010/10/13 Joshua Smith <jhs0807@... <mailto:jhs0807@...>>

    On the pgf-users email list, it was announced that a new version of
    pgf would be released later this year, but without the DV library.
    Another curious user asked what the DV library is, and Stefan pointed
    to part V of the manual of the CVS version of PGF, which describes a
    data visualization library.

    A lot of what is described seems to repeat functionality present in
    pgfplots.  Can anyone provide a brief, but more thorough comparison
    between pgfplots and what is being coded directly into pgf as the data
    visualization library?

    Thanks,
    Josh

    ------------------------------------------------------------------------------
    Beautiful is writing same markup. Internet Explorer 9 supports
    standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
    Spend less time writing and  rewriting code and more time creating great
    experiences on the web. Be a part of the beta today.
    http://p.sf.net/sfu/beautyoftheweb
    _______________________________________________
    Pgfplots-features mailing list
    Pgfplots-features@...
    <mailto:Pgfplots-features@...>
    https://lists.sourceforge.net/lists/listinfo/pgfplots-features

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
Stefan Schulze Frielinghaus | 30 Oct 17:22 2010
Picon

Colormap of 3D plot does not reflect data set

Hi all,

the colormap of an 3D plot does not reflect the actual data in my case.
I played quite a long time with it and couldn't figure out what's going
wrong, so here is a minimal example:

\documentclass{minimal}

\usepackage{tikz}
\usepackage{pgfplots}

\pgfplotsset{compat=1.3}

\begin{document}
\begin{tikzpicture}
\begin{axis}[view={0}{90}, colorbar]
    \addplot3[surf] file {test.dat};
\end{axis}
\end{tikzpicture}
\end{document}

The attached file contains the test data set. I was expecting that the
diagonal gets a color of dark blue because all values of the diagonal
are zeros. Or in other words x==y => z=0.0
But the diagonals color is yellow/orange and according to the colorbar
this would be a value completely different than zero (~10^8).

Is this a problem because of big numbers? Does someone had a similar
problem before? Any hints are really appreciated.

Best regards,
Stefan

PS: I'm using pgfplots-1.4.1
0 0 0.0
0 1 1.42786e+08
0 2 1.51146e+08
0 3 1.59783e+08
0 4 1.4847e+08
0 5 1.6611e+08
0 6 1.4589e+08
0 7 1.62886e+08
0 8 1.14131e+0

1 0 1.73856e+08
1 1 0.0
1 2 1.70329e+08
1 3 1.66938e+08
1 4 1.6611e+08
1 5 1.77537e+08
1 6 1.66938e+08
1 7 1.62886e+08
1 8 1.40395e+08

2 0 1.62886e+08
2 1 1.66938e+08
2 2 0.0
2 3 1.95084e+08
2 4 1.70329e+08
2 5 1.70329e+08
2 6 1.70329e+08
2 7 1.77537e+08
2 8 1.42786e+08

3 0 1.6611e+08
3 1 1.73856e+08
3 2 1.95084e+08
3 3 0.0
3 4 1.77537e+08
3 5 1.73856e+08
3 6 1.7848e+08
3 7 1.77537e+08
3 8 1.38083e+08

4 0 1.6368e+08
4 1 1.70329e+08
4 2 1.6368e+08
4 3 1.77537e+08
4 4 0.0
4 5 1.95084e+08
4 6 1.70329e+08
4 7 1.73856e+08
4 8 1.53216e+08

5 0 1.60549e+08
5 1 1.73856e+08
5 2 1.70329e+08
5 3 1.77537e+08
5 4 1.90649e+08
5 5 0.0
5 6 1.73856e+08
5 7 1.73856e+08
5 8 1.51146e+08

6 0 1.70329e+08
6 1 1.73856e+08
6 2 1.70329e+08
6 3 1.77537e+08
6 4 1.73856e+08
6 5 1.70329e+08
6 6 0.0
6 7 1.95084e+08
6 8 1.35849e+08

7 0 1.6368e+08
7 1 1.73856e+08
7 2 1.73856e+08
7 3 1.73856e+08
7 4 1.77537e+08
7 5 1.73856e+08
7 6 1.95084e+08
7 7 0.0
7 8 1.38083e+08

8 0 1.1941e+08
8 1 1.40395e+08
8 2 1.40395e+08
8 3 1.353e+08
8 4 1.50469e+08
8 5 1.51146e+08
8 6 1.35849e+08
8 7 1.33683e+08
8 8 0.0
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@...
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Gmane