# Tag Info

9

With pgfplots \documentclass[border=4mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture} \begin{axis}[ clip=false, xmin=0,xmax=2*pi, %axis lines=left, %axis x line=middle, %axis y line=left, xtick={0,1.57,3.14,4.71,6.28}, xticklabels={$0$, ...

6

This is what enlargelimits or enlarge x limits is for. If you set enlarge x limits=0.3, the axis limits will be increased by 30 % of the data range: \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \begin{filecontents}{table_1.txt} x y 1 1 2 2 \end{filecontents} \begin{filecontents}{table_2.txt} x y 1 2 2 1 ...

5

As standard node near coordinates is \pgfmathprintnumber{\pgfplotspointmeta}. You want to run that only if \pgfplotspointmeta is non-zero. This may be tested for with \pgfmathfloatifflags as follows: near coords={\pgfmathfloatifflags{\pgfplotspointmeta}{0}{}{\pgfmathprintnumber{\pgfplotspointmeta}}} with 0 indicating test whether the number is equal to ...

4

After fixing the width to 0.95\columnwidth and tinkering yticklabels by yticklabel style={inner sep=2pt,rotate=45,anchor=south east,font=\footnotesize} we get Code: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[margin=2cm]{geometry} \usepackage{pgfplots} \usepackage{lipsum} \usepackage{multicol} \begin{document} ...

4

PSTricks can not smooth the surfaces. One can decrease the size of the grid [ngrid] to approach it, but the computation may become too long. However, PSTrink allows to merge the objects (for instance two tores - similar or not). In the first example, the computation is done by Ghostscript. To reduce the computation time, as in the second example, one can ...

3

Another PSTricks solution: \documentclass[pstricks]{standalone} \usepackage{pst-solides3d} \begin{document} \begin{pspicture}(-8,-4)(8,4) \psset{viewpoint=50 10 40 rtp2xyz,Decran=50,lightsrc=viewpoint,solidmemory, object=tore,r1=3,r0=1,ngrid=36 60,fillcolor=[rgb]{1 0.5 0}} \psSolid[name=toreA,action=none](0,3.5,0) ...

3

Better way to control the width of a plot is to use width key. If you want full width, use width=\textwidth. Also, it is not a good idea to use x=8mm, enlarge x limits={abs=0.625}, for width adjustments. Hence remove them. \documentclass[landscape]{article} \usepackage{xcolor} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.11} ...

3

Implicitly defined surfaces always come out rough using Asymptote. (I've actually started a module to do it better, but there's no guarantee I'll ever get it to work.) So far as I know, none of the other TeX-friendly software you list even attempts to plot implicitly defined surfaces. So your best bet for TeX-friendly software is probably the SageTeX ...

3

I'm not sure what you mean by TeX friendly software. You can use Sage through LaTeX using the sagetex package but, unfortunately, I get output similar to your Asymptote code. If I work with Sage outside of LaTeX, like you're doing with Asymptote, then the result is better. Go to a Sage Cell Server and copy/paste the following code in: var('u,v'); a,b = ...

3

You can simply use \resizebox (and \noindent which is fundamental). Also note the % after \end{tikzpicture}. \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage[margin=2cm]{geometry} \usepackage{pgfplots} \usepackage{lipsum} \usepackage{multicol} \begin{document} \section*{Introduction} \lipsum[1] A “balanced” risk strategy ...

3

I just found that adding set layers, cell picture=true fixes the issue:

2

You may scale the whole figure to column width like this: \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage[margin=2cm]{geometry} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \usepackage{lipsum} \usepackage{multicol} \usepackage{csquotes} \usepackage{siunitx} \newsavebox{\measuredSize} \newcommand{\resizeToWidth}[2]{% ...

2

You can add nodes near coords=\empty to the plot. The complete code: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ybar, height=7cm, width=\textwidth, legend style={at={(0.5,-0.2)}, anchor=north,legend columns=-1}, ylabel={Thousands of SHSs}, xtick=data, nodes near ...

2

You will have to define your x-ticks interval manually. % arara: pdflatex \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[% ,ymode=log ,xmode=log ,log ticks with fixed point ,xtick={10,15,...,35} ,minor xtick={1,...,40} ] ...

1

You have to fix equal minimum size to equivalent columns and rows in both matrices to obtain similar sizes. Otherwise, first column of costmat is adjusted to its size which is narrower than first column in conmat. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \tikzset{box/.style={draw, minimum width=3cm, minimum height=1cm}} ...

1

CW from the comments: Set the calculation into a PGF math macro and use the macro as the extra y ticks setting: \documentclass[border=2pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \tikzset{ declare function={ func(\x)= \x*\x; } } \begin{tikzpicture} \def \xmin {-3} \def \xmax {3} ...

1

You should avoid subfigure that has been obsolete for more than 15 years: \usepackage[caption=false]{subfig} is the call you should do. I'm not sure what you need subfloats for, as you don't use subcaptions. So I'll add empty subcaptions for getting just the letters. Notes: you shouldn't have blank lines between the subfloats that you want side by ...

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