Tag Info

Hot answers tagged

12

pgfplots extensively uses \edef and it's not easy to find which one is responsible for this. My suggestion is to redefine \mathbb so it uses \protected instead of the traditional LaTeX protection mechanism, which fails in \edef. The \protected method, instead, is safe. \documentclass[varwidth=true, border=2pt]{standalone} \usepackage[utf8]{inputenc} % this ...


4

Here's a quick bash script to check for instances of RGB colors: #!/bin/sh pdftops $1.pdf -eps $1.eps status=$(grep -o "RGB" $1.eps | wc -l) echo "$status instance(s) of RGB colorspaces found in file $1.eps" exit $status And a .bat version for Windows: @echo off pdftops %1.pdf -eps %1.eps type %1.eps | find "RGB" /c > __my%1.tmp set /p ...


4

A solution with PGFPlots. I made the parameters similar to Paul's post, the differences are I showed \pgfplotsinvokeforeach which is capable of expanding it's argument, not needed here but good to know for the case \foreach would not work \addplot instead of plot directly working with radian instead of multiplying a 180/pi factor, a new feature of pgfplots ...


4

It's a typo since options in the key value syntax needs a separating comma. This would work; \pgfplotsset{ colormap={something}{ color(0cm)=(blue); color(1cm)=(orange!75!red) },%<---- comma here colormap={somethingelse}{ color(0cm)=(white); color(1cm)=(orange!75!red) } }


4

Maybe you can use a groupplot with horizontal sep=0pt to get Code: \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepgfplotslibrary{groupplots} \pgfplotsset{compat=1.10} \pgfplotstableread{ Year Cat1 Cat2 Cat3 Cat4 2005 10 50 -10 30 2006 -40 60 -15 90 2007 -20 ...


3

I guess you want to continue the previous curve with a new one, so I cooked up semi-automatic style but can be automated by placing a node in the end of the previous curve converting its coordinates into axis coordinates and supplying to the next as the initial point. It mainly abuses the expr accum column type with an initial value. You need to add a zero ...


3

Instead of restructuring your input data, you can also do this automatically via PGFPlots restrict y to domain* feature. Your example would then be plotted by the following source code: \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotstableread{ Year OneCol SecCol ThirdCol ForthCol 2005 10 50 -10 30 2006 -40 ...


3

Combining our chat and the comment to give some ideas though the real solution is mostly art instead of technique. pgfplots doesn't create a miracle within TeX. It simply uses PGF for harvesting all the points(or data points) and then tells TikZ there you go these are the points these are the colors and linetypes, deal with it. When harvesting it collects ...


3

When you compile your code, you get this warning: Package pgfplots Warning: running in backwards compatibility mode (unsuitable t ick labels; missing features). Consider writing \pgfplotsset{compat=1.10} into your preamble. on input line 5. For more details on compatibility please read pgfplots manual, section 2.2 Upgrade remarks, page 8 (in my ...


3

If you add the lines axis on top,% Question 2 axis line style = {very thick,shorten <=-0.5\pgflinewidth}, %Question 1 in your %Axis option section, then you are done.


3

Add axis line style = {draw=white,line width=0.0001pt}, to the options (bit of a hack though). You can even omit draw=white and simply put axis line style = {line width=0.0001pt},. Line is there but invisible. \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{pgfplots.polar} \pgfplotsset{compat=newest} \begin{document} ...


3

Comparison matplotlib's PGF backend Plots will be saved as PGF commands, which are lower-level and thus less suitable for manual editing. This only really matters if you aren't going to go back to Python when you need to change things. (You can also save plots directly to PDF instead.) The layout will be (more or less) what the matplotlib developers ...


3

You are clearly a mathematician or something pretty close since your sentences are always inverted in an (ε, δ) way. You have to read the math backwards but the sentence forwards to decode :P \documentclass[]{article} \usepackage{pgfplotstable} \pgfplotsset{compat=1.10, perf name table/.default=mytable} \pgfplotstableread{ ode23 ode45 ...


2

Since the axis environment is postponing evaluation of some things until \end{axis}, the variables \temps and \angle don't exist anymore by then. In that case, you can use \pgfplotsinvokeforeach that immediately substitutes the loop counter for any #1 given in the loop body. The only drawback is that it doesn't support multiple loop variables, so you have to ...


2

\documentclass[pstricks,border=0pt,12pt,dvipsnames]{standalone} \usepackage{amsmath} \usepackage{pst-plot} \usepackage{pst-math} \usepackage[nomessages]{fp} \FPeval\XMin{0-0} \FPeval\XMax{6} \FPeval\YMin{0-0} \FPeval\YMax{36} \FPeval\XOL{0} % of DeltaX \FPeval\XOR{1/3} % of DeltaX \FPeval\YOB{0} % of DeltaY \FPeval\YOT{1/3} % of DeltaY \FPeval\DeltaX{1} ...


2

Your x tick labels are anchored to the east. But since you are giving align=center and textwidth=3.5cm the labels that are shorter will be aligned to the center with blank space to the right. Hence they stay bit away from the x-axis. To solve it align them to the right with align=right in x tick label style={rotate=45, anchor=east, align=right,text ...


1

There is another workaround to the described problem. By adding disabledatascaling to the list of axis parameters, the weird behavior is gone. Unfortunately, this does not work in case of numbers larger than +/- 16,000 and in case of very small floating point numbers, but for many other cases it works. Here is the resulting source code: ...


1

\documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{plotmarks, calc, intersections} \usepackage{amsmath} \newlength{\radius} \begin{document} \begin{tikzpicture} \begin{axis}[% width=10cm, height=10cm, axis x line = middle, axis y line = middle, scale only axis, xlabel={x [mm]}, ...



Only top voted, non community-wiki answers of a minimum length are eligible