I have to plot something like that (the function I have to integrate is more complicate than this)   How can I do that? Which pst package do I need?  Thanks!
102389
how to plot the function $f:x\mapsto \int_x^{2x}\frac{4}{\sqrt{1+t^4}}\, \textrm{d}t$ with TikZ?
17195
I'm looking to plot day/night on a Google map, for an arbitrary point in time. I'm familiar with generating map tiles; I'm just looking for an algorithm to tell me whether a particular point on the globe is currently in daylight or darkness, or to otherwise plot the curve of the day/night interface onto the map.  I've done some searching, but it's possible I don't even know enough about the problem domain here to know what terms to search for!  Any ideas? Doesn't have to be perfect -- basically, I'm comparing Flickr geolocation data of sunrise and sunset photos (and their "date taken" timestamps) with reality, and this is to help me visualise it.
85515
I'm trying to draw maps similar to these in a LaTeX pdf document:      I want to auto-generate them from a list of pairs (country,color) to determine the colors.  I have found the package pst-map2dII in pst-geo, however its  is from 2004, is in French and the tutorial examples in it no longer seem to work (or I failed to understand something important in the French part).  Is this package still working somehow, and if so how do I get a basic version to work? Either an English manual or a simple tutorial example similar to the world map above, would greatly be welcomed. If not, other packages or methods to auto-generate them outside LaTeX would be equally welcome.
29872
I have this type of data set:  Time          State 22:54:14.716    5 22:54:14.716    5 22:54:14.716    5 22:54:14.716    5 22:54:14.729    4 22:54:14.919    1 22:54:14.919    1 22:54:15.128    5   I would like to plot a graph with pgfplots but the package can not read properly the time format.
121156
I would like to add a straight line to a pgfplot that indicates the mean of the data. For a histogram, this should be a vertical line; for a simple plot, a horizontal line. Now, I do get as far as in the provided minimal working example.  \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{filecontents}{data.csv} 1.84919 0.97280 4.78586 3.95797 4.50753 2.52274 5.13984 0.29474 5.39946 4.40204 \end{filecontents} \newcommand*{\manmean}{3.3832} \begin{document}   \begin{tikzpicture}   \begin{axis}     \addplot[hist={bins=6,}, fill=teal, draw=teal!50!black] table[y index=0] {data.csv};     \addplot[teal, ultra thick, dashed] coordinates {(3.3832, 0) (3.3832, 3)};   \end{axis} \end{tikzpicture} % \begin{tikzpicture}   \begin{axis}     \addplot[teal, mark=*] table [x expr=\coordindex+1, y index=0] {data.csv};     \addplot[teal, ultra thick, dashed] coordinates {(1, \manmean) (10, \manmean)};   \end{axis} \end{tikzpicture} \end{document}     However, two issues remain:   the mean needs to be calculated manually the line's start and end need to be entered manually   Really, the line should stretch along the full extend of the axis and touch the borders.  The pgfplots manual mentions /pgfplots/xmin, /pgfplots/xmax, /pgfplots/ymin and /pgfplots/ymax under 4.14.1 Configuration of Limits Ranges. There is also /pgfplots/boxplot/average in 5.11 Statistics. However, I cannot find a way to access these values.  Theoretically, I could calculate the mean using awk. This does not work, however, because pdflatex somehow will not compile with a shell command that uses printf and quotation marks.  \documentclass{standalone} \usepackage{pgfplots} \usepackage{filecontents} \pgfplotsset{compat=1.9} \begin{filecontents*}{data.csv} 1.84919 0.97280 4.78586 3.95797 4.50753 2.52274 5.13984 0.29474 5.39946 4.40204 \end{filecontents*} \begin{document} \begin{tikzpicture}   \begin{axis}     \addplot[teal, mark=*] table [x expr=\coordindex+1, y index=0] {data.csv};     \addplot[teal, ultra thick, dashed, mark=*] shell {awk '{ sum += $1 } END { printf "%i %f\n%i %f\n", 1, sum/NR, NR, sum/NR }' data.csv};   \end{axis} \end{tikzpicture} \end{document}   Note that the argument -shell-escape is required to compile a document that contains shell scripts, e.g. pdflatex -shell-escape mwe-mean-awk.tex.  The error it gives:  Runaway argument? {awk '{ sum += $1 } END { printf "\end {axis} \end {tikzpicture} \end \ETC. ! Paragraph ended before \pgfplots@addplotimpl@shell@opt was complete. &lt;to be read again&gt;                     \par  l.25   ?   Even if this did work, the line would still be too short for a pretty picture.
40792
Integrate $$\displaystyle \int_{0}^{\pi}{\frac{x\cos{x}}{1+\sin^{2}{x}}dx}$$
19016
Basically, I have a program that will graph the day/night shade similar to this page:   Could any of you give me the equation for graphing a line that approximately follows the day/night curve. I can't really think of an equation, so I'm asking here. Thanks.
123715
I need to plot the Bessel functions of first and second kind (J and Y), and the modified Bessel functions of first and second kind (I and K), with integer order, from order 0 to order 5, using pgfplots. Several solutions have been already presented in other questions, but:  Gnuplot makes available for plots only the Bessel functions of the first and second kind and only of order 0 and 1, so  is not suitable. I would not like to use nor pstricks, neither LuaTeX, so also  and  are not suitable.  is quite similar, but has no answer and no examples in the comments.  How to accomplish this with pgfplots? Also an external solution with numpy, scipy and Matplotlib as in  would be ok (however, the code seems to work only for the J function).    I tried using the code in the last linked , inserting as an \addplot the file example-04.txt. It works for the function J, but it prints unacceptable values (e+09) for function Y, which is very large and negative near 0. The code which generates example-04.txt is Python and here it would be almost certainly OT.
78076
Consider the following example:  \documentclass{article}  \usepackage{pstricks-add} \usepackage{booktabs}   \psset{   unit = 0.7,   dimen = middle,   ticks = none,   labels = none }  \newcommand*\pind[2]{%  \psset{linecolor = red}   \psline(#1,0)(#1,#2)   \psline(!#1 0.2 sub #2)(!#1 0.2 add #2) } \newcommand*\enkeltobservationer{%   \begin{pspicture}(-0.5,-0.2)(5.9,6.3)     \psaxes{-&gt;}(0,0)(-0.2,-0.2)(5.4,5.5)[\small{$x$},0][\small{$h(x)$},90]     \pind{0.5}{3}     \pind{1.0}{5}     \pind{1.5}{3}     \pind{2.0}{3}     \pind{2.5}{4}     \pind{3.0}{2}     \pind{3.5}{5}     \pind{4.0}{1}     \pind{4.5}{4}     \pind{5.0}{2}   \end{pspicture}% } \newcommand*\soejle[2]{%  \psset{fillcolor = red}   \psframe[fillstyle = solid](!#1 0.5 sub 0)(#1,#2) } \newcommand*\intervaller{%   \begin{pspicture}(-0.5,-0.2)(5.9,6.3)     \psaxes{-&gt;}(0,0)(-0.2,-0.2)(5.4,5.5)[\small{$x$},0][\small{$h(x)$},90]     \soejle{0.5}{3}     \soejle{1.0}{5}     \soejle{1.5}{3}     \soejle{2.0}{3}     \soejle{2.5}{4}     \soejle{3.0}{2}     \soejle{3.5}{5}     \soejle{4.0}{1}     \soejle{4.5}{4}     \soejle{5.0}{2}   \end{pspicture}% }   \begin{document}  \begin{table}  \centering   \begin{tabular}{l c c c}     \toprule      Begreb               &amp;      Forkortelse          &amp;      Enkeltobservationer  &amp;      Intervaller            \\      \midrule      Hyppighed            &amp;      $h(x)$               &amp;      \enkeltobservationer &amp;      \intervaller           \\     \bottomrule    \end{tabular} \end{table}  \end{document}     I would like to vertically center Hyppighed and $h(x)$ relative to the figures; how do I do that?
68854
I want to plot the function $\frac{3 x}{1 + x}$ with pgfplots. Using  \begin{tikzpicture}     \begin{axis}[axis x line=none, axis y line=none, no markers]         \addplot {3 * x / (1 + x)};     \end{axis} \end{tikzpicture}   I get this:   This is obviously wrong. The same function plotted in Grapher.app:
48015
I would like to plot these four equations :   $$y=\dfrac{3}{2x+1}, y=3x-2, x=2   y=0$$   and i don't know how to draw vertical line of equation x=2 and  shade a region like the picture below      \documentclass{article} \usepackage{pgfplots} \usepackage{pst-plot} \usepackage{pstricks}  \begin{document}  \begin{table}[h] \centering     \begin{tikzpicture}         \begin{axis}[              extra y ticks       = 2,       extra y tick labels = z,       extra y tick style  = { grid = major },              axis lines=middle,              grid=major,               xmin=-1,                 xmax=3,         ymin=-1,         ymax=3,         xlabel=$x$,         ylabel=$y$,                 xtick={-1,-0.5,0,...,3},         ytick={-1,-0.5,0,...,3},         legend style={at={(axis cs:-.5,0,1)}, anchor=north west,width=90cm, draw=none,opacity=.9, inner sep=2pt,fill=gray!10}]             %\addlegendentry{$f(x)=2^{x}$}             %\addlegendentry{$f(x)={\left(\dfrac{1}{2}\right)}^x$}             smooth,                 enlargelimits=false,         axis line style={latex-latex},  \addplot[thick, samples=100, domain=0:6,blue] {3/(2*x+1)}; %node[right] {$f(x)=2^{x}$}; \addplot[thick, samples=50, smooth,domain=0:6,olive] {3*x-2}; % node[right]{$f(x)={\dfrac{1}{2}}^x$};     \end{axis} \end{tikzpicture} \end{table}  \end{document}   which produces :
113553
What I want:    This is what I have so far in terms of code:  \newcommand\gauss[2]{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}  % Gauss function, parameters mu and sigma  \begin{tikzpicture} \begin{axis}[every axis plot post/.append style={   mark=none,domain=-2:3,samples=50,smooth}, % All plots: from -2:2, 50 samples, smooth, no marks axis x line*=bottom, % no box around the plot, only x and y axis axis y line*=left, % the * suppresses the arrow tips enlargelimits=upper] % extend the axes a bit to the right and top \addplot {\gauss{0}{0.5}}; \addplot {\gauss{1}{0.75}}; \end{axis} \end{tikzpicture}
90404
Trying to plot the sin(x) function, I get this result:    The MWE is here:  \documentclass{standalone} \usepackage{ pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot[samples=500]{sin(x)}; \end{axis} \end{tikzpicture} \end{document}   cos(x) looks like an inverted parabola and tan looks just like sin.  I'm using pdflatex and MiKTeX. Any ideas?
76411
I just started to use pgfplots and I'm trying to plot the line x=3 (a line parallel to the y axis where x is 3). I've tried to find an answer on the net, but all the examples always show how to ploy cases of y=..., and not the other way around.  I should point out that the graph contains more than one plot (if it matters).
35482
Although I have known that $\displaystyle\int_0^\infty {{\sin x} \over x} \, dx = {\pi  \over 2}$, I have no idea how to work out $\displaystyle\int_0^{ + \infty } {{\cos x} \over x} \, dx$. How can I?
37756
Changing thickness line using pst-solides3d:  I'm trying to draw a thinness line in space using pst-solides3d:  \begin{center} \psset{unit=0.4cm} \psset[pst-solides3d]{viewpoint=40 30 25 rtp2xyz,Decran=60,fontsize=0} \begin{pspicture}(-2,-3)(3,10) \defFunction[algebraic]{paraboloid1}(r,t){r*cos(t)}{2*r*sin(t)}{r^2} \psSolid[algebraic,object=surfaceparametree,base=0 2 pi 2 div 3 pi mul 2 div,linewidth=0.5pt,function=paraboloid1,ngrid=20 25,linecolor=blue,incolor=Turquoise]% \psSolid[object=line,args=0 4 0 0 4 4,linewidth=0.1pt] \end{pspicture} \end{center}   but command linewidth seems have no effect. Thanks.
20986
I have a function defined as:     How can I graph that using functions instead of coordinates? I'm currently working with pgfplots but I'm open to something else if it's better.