Some TeX Developments

Coding in the TeX world

Real life pgfplots examples

with 8 comments

I’ve just sent a draft to TUGBoat for an article about pgfplots. As many readers will know, pgfplots is built on pgf/Tikz, which means that it can be used for both DVI and PDF output, and with plain TeX, LaTeX and ConTeXt. In my draft, I’ve used some real life plots (from a couple of recent publications in the research group I work in). The draft will probably change a bit, but for a preview take a look a the the PDF.

Written by Joseph Wright

January 30th, 2010 at 4:45 pm

Posted in General

Tagged with ,

8 Responses to 'Real life pgfplots examples'

Subscribe to comments with RSS or TrackBack to 'Real life pgfplots examples'.

  1. Hi Joseph,

    I think it is excellent. I have learnt a few new things about pgfplots.

    Leo

    leo

    31 Jan 10 at 7:41 am

  2. Couldn’t one simplify the last example by using the for command of TikZ: \foreach \x in {1,2,...,19} {\addplot table[y index = \x]{data-set-four.txt}};?

    Frakturfreund

    31 Jan 10 at 8:26 am

  3. Good idea: I’ll update my working copy.

    Joseph Wright

    31 Jan 10 at 9:04 am

  4. Thank you! I just tried to apply the same trick to the color definition, but this seems to be more difficult because of the not-so-easy \pgfplotscreateplotcyclelist command.

    Frakturfreund

    31 Jan 10 at 9:44 am

  5. Yes, \pgfplotscreateplotcyclelist is very picky: I’d had the same idea, but suspect it will not work.

    Joseph Wright

    31 Jan 10 at 9:53 am

  6. for a beginner, to say pgf “works equally well with the traditional DVI-based work flow” is a bit misleading.

    Initially, I could not even get Figure 1 right. Later I found out that xdvi can not properly display the generated .dvi file, I have to convert dvi to ps or pdf to see the correct figure.

    (I am using Ubuntu Karmic, with xdvi version 22.84.10)

    hongbo zhao

    2 Feb 10 at 3:44 am

  7. Hello Hongbo,

    It’s well known that viewing DVIs directly results in a number of restrictions. For example, unless the DVI viewer includes an EPS interpreter then any EPS figures will not show up. The DVI workflow to me implies tex -> dvips -> ps2pdf and then looking at the PDF result. Sorry if that was not clear. The key point is that pgf has driver information for both routes: compare using pstricks, which does not work with pdflatex (at least without effort).

    Joseph Wright

    2 Feb 10 at 7:16 am

  8. If a beginner starts with latex -> dvi -> ps -> pdf, it is asking for trouble.

    leo

    2 Feb 10 at 11:31 am

Leave a Reply