Hi Johannes,

a couple of months ago, you reported a problem with SVG output of pgfplots: there have been TWO SVG rather than one per figure.

Although I assume that the issue is no longer important for you, you may be interested in the following news:

I am currently working on a prototype which allows pgfplots to save one temporary pgf node - and this node was the cause for the outer SVG. I have just ran an experiment with

htlatex testXXX.tex

on your example. I only uncommented some of your \HCode instructions and added my new feature 'cell picture=false' to the option list and got the attached results (just one SVG).

Best regards

Christian



Am 27.07.2011 03:04, schrieb Johannes Wilm:
Hi again,
sorry for cross-posting. I am not quite sure whether this falls into the expertise of one or the other group.

The attached is a test case of a document which includes a graph I've created with pgfplots and then converted to html using tex4ht. I fixed the SVG-output with the script I recently mailed around.

The problem is this: There is only one graph. Yet for some reason 2 SVG files are created. The second SVG-file seems to just be empty, whereas the first one includes the graph. For some reason the HTML-code that is being output only includes the second, empty, SVG-file.

This is what I ran:

/dvilualatex test.tex
dvilualatex test.tex/
/dvilualatex test.tex/
/tex4ht -f/test.tex/
/t4ht -f/test.tex/
/fix_svg_legend.py test-1.svg/
/fix_svg_legend.py test-2.svg/

Obviously I could make a script that simply exchanges all occurrences of "test-2" with "test-1" and so on. But strangely, when the legend is in a separate svg, the legend works fine, so the numbering wouldn't work out that way.

I believe this is my very last issue with the whole setup. So if it cannot be resolved, I'll spend another day on a quick fix rather than trying to switch tools as some have recommended I do.

Sincerely,

--
Johannes Wilm
http://www.johanneswilm.org
tel: +1 (520) 399 8880


------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey


_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

SVG-Viewer needed.

<<attachment: testXXX-1.svg>>

%\makeatletter

%\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}

%\makeatother

%\HCode "xhtml,png,charset=utf-8".a.b.c.


\documentclass[11pt,a4paper]{book}

\def\pgfsysdriver{pgfsys-tex4ht.def}
\usepackage{pgfplots}

\pgfplotsset{width=\textwidth,compat=1.3,cell picture=false,every axis/.append style={font=\footnotesize},cycle list name=black white}

\begin{document}
\begin{tikzpicture}

\begin{axis}[ylabel=\%,x tick label style={ /pgf/number format/1000 sep=},ymin=0,xmin=1950,xmax=2009,title=Government Consumption Share of PPP Converted GDP Per Capita at 2005 constant prices] 
\addplot[smooth,solid] coordinates {
(1950,12.98732304) (1951,11.18937899) (1952,10.63447043) (1953,11.25741618) (1954,11.35201741) (1955,10.98310036) (1956,11.27808626) (1957,11.06275337) (1958,11.21626046) (1959,11.18458192) (1960,11.02716074) (1961,10.97486816) (1962,10.19712891) (1963,8.50170024) (1964,8.220444391) (1965,8.181873469) (1966,7.859215042) (1967,8.269806768) (1968,8.023789126) (1969,7.867343418) (1970,8.469691612) (1971,8.352726749) (1972,9.263915297) (1973,7.560088984) (1974,7.436700475) (1975,9.207375031) (1976,9.725811776) (1977,9.495010597) (1978,13.74144043) (1979,22.99348928) (1980,23.05639171) (1981,24.02424559) (1982,28.25010594) (1983,35.38307779) (1984,40.11885923) (1985,43.3304334) (1986,44.7847218) (1987,46.7237337) (1988,35.62924609) (1989,30.65659214) (1990,39.89428582) (1991,27.48910619) (1992,24.75024034) (1993,24.68286164) (1994,23.26013887) (1995,23.69594547) (1996,22.53334681) (1997,21.35901868) (1998,21.53873871) (1999,22.22968487) (2000,21.95238646) (2001,21.3231532) (2002,21.29835897) (2003,21.6183452) (2004,21.30177929) (2005,21.51748623) (2006,20.88675316) (2007,20.32549306) (2008,21.13794484) (2009,21.75075984) 
};
\addlegendentry{Country 1}
\addplot[smooth,dotted] coordinates {
(1950,8.90574995) (1951,9.181850378) (1952,9.4040808) (1953,9.790597533) (1954,9.766571438) (1955,9.721345475) (1956,9.898347958) (1957,9.986947451) (1958,10.13725015) (1959,10.11995062) (1960,9.9669931) (1961,9.781482565) (1962,9.968596797) (1963,10.33417822) (1964,10.07453069) (1965,10.17668623) (1966,10.4859246) (1967,10.6188237) (1968,10.93369976) (1969,11.01396095) (1970,11.25808879) (1971,11.43128231) (1972,11.45138898) (1973,11.36045323) (1974,11.33276575) (1975,11.50069671) (1976,11.72466305) (1977,12.25394557) (1978,12.52158998) (1979,12.61603185) (1980,12.68712893) (1981,13.01282874) (1982,12.97669774) (1983,12.92432378) (1984,12.72145426) (1985,12.63447969) (1986,12.49591698) (1987,12.22704263) (1988,12.05291461) (1989,12.07675903) (1990,12.25254614) (1991,12.74485006) (1992,13.14305947) (1993,13.41082617) (1994,12.89670369) (1995,12.41585298) (1996,12.34588672) (1997,12.01926401) (1998,12.00221677) (1999,11.69852271) (2000,11.11468531) (2001,11.08248726) (2002,11.05693806) (2003,10.89817902) (2004,10.44900187) (2005,10.05582475) (2006,9.829361577) (2007,9.567882534) (2008,9.714898563) (2009,10.42225882)
};
\addlegendentry{Country 2}
\end{axis}\end{tikzpicture}

%\ref{govconsumptionlegend}

\end{document}
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Reply via email to