Re: [NTG-context] Polar pgfplots seems to be broken (Aditya Mahajan)

2020-12-21 Thread Gavin

> Date: Mon, 21 Dec 2020 00:51:06 -0500 (EST)
> From: Aditya Mahajan 
> 
> On Sun, 20 Dec 2020, Gavin wrote:
> 
>> Hello,
>> 
>> I’m drawing solar system diagrams using the pgfplots module, but the polar 
>> library seem to be broken. It looks like it is calling something with a 
>> \begin{axis}... command. Here is the error message for a short document, 
>> included below.
>> 
>>> tex error   > tex error on line 18 in file 
>>> /Users/Gavin/Documents/Computer/ConTeXt/Polar Plot 
>>> Experiments/Untitled.tex: ! Undefined control sequence
>>> 
>>> \pgfplots@environment@polaraxis@ [#1]->\begin 
>>> {axis}[#1,data cs=polar,axis 
>>> type=polar]
>>> l.18\startpolaraxis[]
>>> 
>>> 16 \startsection[title={Polar Plot}]
>>> 17  \starttikzpicture   % tikz code
>>> 18 >>   \startpolaraxis[]
>>> 19  
>>> \addplot+[mark=none,domain=0:720,samples=600]{sin(4*x)};
>>> 20  \stoppolaraxis
>>> 21  \stoptikzpicture
>>> 22 \stopsection
>>> 
>>> mtx-context | fatal error: return code: 256
>> 
>> I’d love a fix or an idea for a work around. 
> 
> This is a bug in pgfplots macro pgfplotsdefineaxistype, which uses an 
> explicit \begin{axis} ... \end{axis} instead of the more portable \axis ... 
> \endaxis. Attached is a quick fix, but it has been quite a while since I 
> looked at pgfplots code, so it may be better to post a bug-report on pgfplots 
> mailing list for a proper fix.
> 
> Aditya
> 
> URL: 
> 

Aditya,

Thanks for the quick fix! I will post a bug report on the pgfplots mailing 
list, including your helpful diagnosis of the problem.

Gavin
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Polar pgfplots seems to be broken

2020-12-20 Thread Aditya Mahajan
On Sun, 20 Dec 2020, Gavin wrote:

> Hello,
> 
> I’m drawing solar system diagrams using the pgfplots module, but the polar 
> library seem to be broken. It looks like it is calling something with a 
> \begin{axis}... command. Here is the error message for a short document, 
> included below.
> 
> > tex error   > tex error on line 18 in file 
> > /Users/Gavin/Documents/Computer/ConTeXt/Polar Plot 
> > Experiments/Untitled.tex: ! Undefined control sequence
> > 
> > \pgfplots@environment@polaraxis@ [#1]->\begin 
> >  {axis}[#1,data cs=polar,axis 
> > type=polar]
> > l.18\startpolaraxis[]
> > 
> > 16 \startsection[title={Polar Plot}]
> > 17  \starttikzpicture   % tikz code
> > 18 >>   \startpolaraxis[]
> > 19  
> > \addplot+[mark=none,domain=0:720,samples=600]{sin(4*x)};
> > 20  \stoppolaraxis
> > 21  \stoptikzpicture
> > 22 \stopsection
> > 
> > mtx-context | fatal error: return code: 256
> 
> I’d love a fix or an idea for a work around. 

This is a bug in pgfplots macro pgfplotsdefineaxistype, which uses an explicit 
\begin{axis} ... \end{axis} instead of the more portable \axis ... \endaxis. 
Attached is a quick fix, but it has been quite a while since I looked at 
pgfplots code, so it may be better to post a bug-report on pgfplots mailing 
list for a proper fix.

Aditya



polar.tex
Description: TeX document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Polar pgfplots seems to be broken

2020-12-20 Thread Gavin
Hello,

I’m drawing solar system diagrams using the pgfplots module, but the polar 
library seem to be broken. It looks like it is calling something with a 
\begin{axis}... command. Here is the error message for a short document, 
included below.

> tex error   > tex error on line 18 in file 
> /Users/Gavin/Documents/Computer/ConTeXt/Polar Plot Experiments/Untitled.tex: 
> ! Undefined control sequence
> 
> \pgfplots@environment@polaraxis@ [#1]->\begin 
>  {axis}[#1,data cs=polar,axis 
> type=polar]
> l.18  \startpolaraxis[]
> 
> 16 \startsection[title={Polar Plot}]
> 17\starttikzpicture   % tikz code
> 18 >> \startpolaraxis[]
> 19
> \addplot+[mark=none,domain=0:720,samples=600]{sin(4*x)};
> 20\stoppolaraxis
> 21\stoptikzpicture
> 22 \stopsection
> 
> mtx-context | fatal error: return code: 256

I’d love a fix or an idea for a work around. I’m using ConTeXt Suite (ver: 
2020.12.15 10:10 MKIV  fmt: 2020.12.16), but I’ve tried it with TeX Live 2020 
and the MkIV included with LMTX. Both have the same issue.

Thanks!
Gavin


\usemodule[tikz]% TikZ module for diagrams
\usemodule[pgfplots]% PGFPlots module for graphs
\pgfplotsset{compat=1.17}   % Required to get new any features that could 
cause compatibility issues.
\usepgfplotslibrary[polar]  % ConTEXt

\starttext
\startsection[title={Rectangular Plot}]
\starttikzpicture% tikz code
\startaxis[]
\addplot+[mark=none,domain=0:720,samples=600]{sin(4*x)};
\stopaxis
\stoptikzpicture
\stopsection

\startsection[title={Polar Plot}]
\starttikzpicture   % tikz code
\startpolaraxis[]
\addplot+[mark=none,domain=0:720,samples=600]{sin(4*x)};
\stoppolaraxis
\stoptikzpicture
\stopsection
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___