[Tex/LaTex] Dos and Don’ts of \pgfplotsset{compat=newest}

pgfplots

Question

I just upgraded to 1.9. Christian recommends against the \pgfplotsset{compat=newest}, but that leaves one having to come back and update compat=x.y in one's projects, several times, over a long period of time. I realise that if the project originally worked there's no need, but that's not always the case. Plenty of my projects get reused and improved. But, it's not a big deal if there really is no better alternative. What would be considered a valid use of compat=newest, if there is one. And, is it one thing or the other – compat=x.y or compat=newest?

Conclusion

The bulk of Christian's answer is about the utility of being able to set the maximum version on a per project basis and not only that, it highlights a built in feature that can actually recommend an appropriate version. None the less, the last paragraph is the telling one. It's better to have compat set to the latest version you currently know gives you what you want. It may seem that newest is a good idea if you're up to date with latest, but it won't always be.

So compat=newest is an ironic feature. It seems there is no Do. The Dos apply to the other settings of compact and the facilities they provide.

Best Answer

As user of the pgfplots software, I do not want to risk that a package update leads to a different outcome of my existing images. Consequently, I would like to have an opportunity to "preserve" my output even if the package author decides to change something for "new" documents. The alternative would be to browse through entire documents to see if any "obvious" change has occurred. I expect that such changes do not happen, even if an isolated view on the image clearly confirms that a change was caused by a bugfix.

On the other hand, I as author of pgfplots need the freedom to make changes to the software, either because of new features or in order to fix bugs. I have an interest in maintaining existing workarounds created by users, either those derived because pgfplots lacked support for something or because pgfplots had a bug. A package update should not invalidate old work-arounds, but it should provide a fix for all those users who "started a document from scratch".

Choosing a suitable \pgfplotsset{compat=<version>} flag is a solution which addresses both use-cases, and the fact that pgfplots suggests a suitable value for <version> should make it simpler to choose it.

However, the choice compat=newest spoils both use-cases: both suffer seriously.

There may be a scenario in which backwards compatibility is of minor importance - this is where compat=newest has a use-case. Personally, I do not know what the use-case might be. The choice compat=newest means "I do not care if my old figures change in appearance after the next version upgrade".

Related Question