Cannot get sin and cos to display in TIKZ I have the following code which I took from another site and was trying to adapt in order to plot a sin function and a cos function stacked up one on top of each other:  \def\xs{1} \def\ys{6}  \begin{tikzpicture}[domain=-3:5, xscale=\xs, yscale=\ys, &gt;=latex]   \def\tr{0.1}   \def\ts{0.6}   \def\al{1.3}   \def\n{1.6}   \def\I{0.3506}   \def\ti{0.4071}   \def\S{-0.1340}   \def\Sangle{-42}   \def\f1{0.8}    % Function1   \draw[very thin,color=gray!30] (-3-0.2/\xs,0-0.2/\ys)     grid[xstep=0.5, ystep=0.1] (5+0.2/\xs,0.7+0.2/\ys);   \draw[-&gt;, line width=1pt] (-3,0) -- (5.25,0)     node[below] {$r$};   \draw[-&gt;, line width=1pt] (-3,0) -- (-3,0.75)     node[left] {$f_\phi$};   % function   \draw [red,thick,smooth,domain=0:5] plot (\x, {cos(\x)});   % side decoration   \draw[dashed] (\I,0) node[below] {$I$} -- (\I,\ti) -- (-3,\ti)     node[left] {$u_i$};   \draw [decorate, decoration={brace, amplitude=4pt}]     (-3.5,\tr) -- (-3.5,\ts) node [black,midway,left=3pt] {$\Delta$};   % texto   \path[-&gt;, draw]     (\I,\ti) to[out=0, in=180] ++(0.75,0.1)     node[anchor=west, text ragged, text width=1.6cm, fill=white]     {Point of interest};   \node[above] at (1,0.7)     {Function $f_\phi$ definition};    % Function 2   \def\ys{3}   \begin{scope}[yshift=-0.3cm, domain=0:10, &gt;=latex, yscale=\ys]     \draw[very thin,color=gray!30] (-3-0.2/\xs,-0.15-0.15*0.2/\ys)       grid[xstep=0.5, ystep=0.03] (5+0.2/\xs,0.03+0.15*0.2/\ys);     \draw[-&gt;, line width=1pt] (-3,-0.15) -- (5.25,-0.15)       node[below] {$\log(\psi)$};     \draw[-&gt;, line width=1pt] (-3,-0.15) -- (-3,0.05)       node[left] {$U'(\psi)$};     \draw [green,domain=0:5] plot (\x, {sin(\x)});     \node[left] at (-3,0) {$0$};     \draw[dashed] (\I,0.03) -- (\I,\S) -- (-3,\S) node[left] {$U'(I)$};     \path[-&gt;, draw]       (\I,\S) to[out=-2, in=180] ++(1.75,0.02)       node[anchor=west, fill=white] {$S$};     \node[above] at (1,0.03) {Function $F_\phi$ definition};   \end{scope} \end{tikzpicture}   But I get lines!!!    I have tried changing the domain range and the scale values. I don't really understand what's happening here! How can I get my functions to display?  Thanks
Incorrect plot using pgfplots (trigonometric functions like cos, sin and tan) I'm trying to plot a function with pgfplots for LaTeX. Unfortunately, pgfplots plots the function incorrectly.  Here is the LaTeX code I use:  \begin{figure}[H] \centering \begin{tikzpicture}     \begin{axis}[xlabel=Gameplays,ylabel=Rating]         \addplot+[gray,domain=1:30]         {0.5 + 0.5 * ((atan(x) * 2 / pi)^11.79)};     \end{axis} \end{tikzpicture} \caption{Omzetten van aantal gameplays tot impliciete rating} \label{fig:omzetten_impliciete_ratings} \end{figure}   Here is how the function should look like:     This is how it is plotted:    Does anyone know what I do wrong?  Thanks in advance!
How do I list the default installed packages? I am trying to produce a presentation where code for a pair of arrays appear in the same position of a beamer slide.  I tried something like this (with different combinations and braces) and did not work.  \begin{verbatim}\only&lt;1&gt;       V1 V2 V3 V4 [1,]  0  1  1  0 [2,]  1  0  1  0 [3,]  1  1  0  0 [4,]  0  0  0  0   \only&lt;2&gt;       V1 V2 V3 V4 [1,]  0  1  0  0 [2,]  1  0  1  0 [3,]  0  0  0  0 [4,]  0  0  0  0  \end{verbatim}    Appreciate any suggestions.  Thanks! Why is using a wild card with a Java import statement bad? I am making a regex expression in which I only want to match wrong tags like: &lt;p&gt; *some text here, some other tags may be here as well but no ending 'p' tag* &lt;/p&gt;   &lt;P&gt;Affectionately Inscribed &lt;/P&gt;&lt;P&gt;TO &lt;/P&gt;&lt;P&gt;HENRY BULLAR, &lt;/P&gt;&lt;P&gt;(of the western circuit)&lt;P&gt;PREFACE&lt;/P&gt;   In the above same text I want to get the result as  &lt;P&gt;(of the western circuit)&lt;P&gt; and nothing else should be captured. I'm using this but its not working:  &lt;P&gt;[^\(&lt;/P&gt;\)]*&lt;P&gt;   Please help. In Harry Potter and the Cursed Child, why would anyone believe this rumor? From Harry Potter and the Cursed Child - Part I:     Scorpius Malfoy is talking with his best friend Albus Potter: SCORPIUS: So your dad thinks the rumors are true -- I am the son of Voldemort? ALBUS (nods): His department are currently investigating it. SCORPIUS: Good. Let them. Sometimes -- sometimes I find myself thinking -- maybe they're true too. ALBUS: No. They're not true. [...] Harry Potter and the Cursed Child, Part I - Act Two, Scene Sixteen, Hogwarts Library - Page 143 - Scholastic    Harry Potter and the Cursed Child picks up right at the point where Harry Potter and the Deathly Hallows leaves off, at the epilogue. It is nineteen years post-Hogwarts, and Scorpius Malfoy and Albus Potter are eleven-year-old first-years.   I'm about as good at math as J.K. Rowling (meaning I'm terrible at it!), so correct me if I'm wrong. Voldemort was killed at the Battle of Hogwarts in May of 1998. At least eight years post-Battle had to have passed before Albus and Scorpius were born (I'm estimating the boys were born in 2006). Voldemort would have had to have been alive in 2005/2006 in order to have ...      ... fathered Scorpius Malfoy.   As the wizarding world was fully aware of Voldemort's death in 1998, why would anyone even remotely believe that Voldemort is ...      ... Scorpius Malfoy's father?   I can understand the possibility of Harry believing the rumor because ...     ... his scar hurt, and his scar is Harry's connection to Voldemort.   But other than Harry, it doesn't make sense to me why anyone would believe such a ridiculous rumor. So, why? How do you determine the size of a file in C? How can I figure out the size of a file, in bytes?  #include &lt;stdio.h&gt;  unsigned int fsize(char* file){   //what goes here? } What Wording Did Witches and Wizards in Other Cultures Use for Spells? Projection of a point onto a simple convex polytope I have a convex polytope described by the intersection of a hypercube and two parallel lower and upper hyperplanes cutting through the hypercube. I want to find the projection of a point onto the polytope. I read the question  and see that the general problem of finding a projection onto a convex polytope can be solved with quadratic programming. However, taken alone, projection onto a hypercube or a hyperplane is trivial. For the hypercube, each dimension is defined by a lower+upper bounds and we just pull each dimension within those bounds, which take $O(n)$ time in $n$ dimensions. For the hyperplane just find the projection onto it. So I'm wondering whether there is simpler method for finding such a projection, maybe somehow combining the two independent projections. Unity Tweak tool fails to start with the error "com.canonical.unity.webapps schema is missing" com.canonical.unity.webapps   In order to work properly, Unity Tweak Tool recommends you install the necessary packages In Fallout 4 the Bobbleheads are back.  Once you pick them up they stay in your inventory with a weight of 0 and a value of 300. Will I need them later ? Do I lose the bonus if I sell them or drop them somewhere ? Same with the magazines.  Is there any disadvantage to selling them ? $g^k$ is a primitive element modulo $m$ iff $\gcd (k,\varphi(m))=1$ I have B1/B2 Visa. Can I travel for Business trip to US with this Visa? Techniques for embedding images with transparent backgrounds in LaTeX Can someone please suggest a query to directly see the number of answers I posted that were accepted. Right now I have to manually count from total given answers.  Hope there is an easy way. Why is AES resistant to known-plaintext attacks? Can't unhide objects Does Gentle Repose work on a Circle of Spore Druid's Fungal Infestation Ability? The Circle of Spores Druid feature Fungal Infestation states:  If a beast or humanoid that is Small or Medium dies within 10 feet of you, you can use your reaction to animate it, causing it to stand up immediately with 1 hit point. The creature uses the zombie statistics. It remains animate for 1 hour, after which time it collapses and dies.  Circle of Spore druids also gain access to the  spell, which states:  You touch a corpse or other remains. For the duration, the target is protected from decay and can’t become undead. The spell also effectively extends the time limit on raising the target from the dead, since days spent under the influence of this spell don’t count against the time limit of spells such as raise dead.  There seem to be some good arguments that they cannot work together:  First, Gentle Repose states the target cannot become undead, which would seem to preclude Gentle Repose working on a fungally infested creature that appears to be in some sense raised from the dead. Second, gentle repose states you touch a corpse or other remains - one could argue that using the zombie statistics, the fungally infested entity is neither a corpse or remains, but an undead zombie.  However, there are also some reasonable arguments that they could work together:  First, the Fungal Infestation does not say that the creature is undead or a zombie, but that it uses the statistics of a zombie, which might leave room for a RAW interpretation that the features could work together (for example, it could be considered a fungally infested corpse or fungally raised remains). Second, Gentle Repose says that it extends the time limit of raising the target from the dead and makes reference to spells like Raise Dead, which in flavour are similar to what happens with Fungal Infestation.  RAW, can a player cast gentle repose on a zombie created by Fungal Infestation? The origin of spin is some what a puzzle to me, everything spin from galaxies to planets to weather to electrons.  Where has all the angular momentum come from? Why is it so natural?  I was also thinking do photons spin? we always think of the wave as a standard 2d sin wave but could this rotate in 3d? What implications would this have?   And what about spacetime how does all the spinning effect?  This has always been avoided in all lectures and classes I ever went to. Add new alias to Gmail without SMTP (forwarding-only address) What should I look for when shopping for my first DSLR? I am thinking of buying a digital SLR camera. What things should I be looking for?