Just sqrt(x) with 1,2,3,4 ticks

• MHB
• karush
In summary, we can shade the curve up to $x=4$ by adding \addplot[fill=cyan!30, draw=none, domain=0:4] {sqrt(x)} \closedcycle; and remove the arrows on the axis by using axis lines*=middle with a star (*). The axis ends at $x=5$ because of the specified xmax=5 and we can draw ticks using xtick={1,2,3,4} and ytick=\empty.

karush

Gold Member
MHB
\begin{tikzpicture}[scale=1]
%preamble \usepackage{pgfplots}
\begin{axis}[xmin=-1, xmax=5, ymin=-1, ymax=3, axis lines=middle, ticks=none]
draw = blue, smooth, ultra thick,
domain=0:4,
] {sqrt(x)}
foreach \x in {1,2,3,4} { (axis cs:{\x},0) node[below left] {\x} };
\end{axis}
\end{tikzpicture}

1. how do I shade between the curve and x-axis on [0,4]
2. I don't need the arrows on the axis
3 where does \end{axis} actually end?
4. suggestions...

looked at various samples but there was a lot of versions
going to post this with a problem on LinkedIn so trying to make it look the best
however don't think they render tikz and probably not script ,,,, maybe
its all new to me

karush said:
1. how do I shade between the curve and x-axis on [0,4]
2. I don't need the arrows on the axis
3 where does \end{axis} actually end?
4. suggestions...
1. We can add \addplot[fill=cyan!30, draw=none, domain=0:4] {sqrt(x)} \closedcycle; to shade the curve up to $x=4$.
2. If we specify axis lines*=middle with a star (*) then the arrows are omitted.
3. The axis ends at $x=5$ because that was specified with xmax=5.
4. We can use xtick={1,2,3,4}, ytick=\empty instead of ticks=none and a foreach to draw ticks.

\begin{tikzpicture}[scale=1]
%preamble \usepackage{pgfplots}
\begin{axis}[xmin=-1, xmax=5, ymin=-1, ymax=3, axis lines*=middle, xtick={1,2,3,4}, ytick=\empty]
draw = blue, smooth, ultra thick,
domain=0:4,
] {sqrt(x)};
\end{axis}
\end{tikzpicture}

1. What is "Just sqrt(x) with 1,2,3,4 ticks"?

"Just sqrt(x) with 1,2,3,4 ticks" is a mathematical expression used to represent the square root function with specific increments or ticks of 1, 2, 3, or 4. It is commonly used in cooking and baking recipes to accurately measure and scale ingredients.

2. How do I use "Just sqrt(x) with 1,2,3,4 ticks" in my recipes?

To use "Just sqrt(x) with 1,2,3,4 ticks", simply replace the "x" with the desired amount of ingredient you need to measure. For example, if a recipe calls for 9 ounces of flour, you would use "sqrt(9) with 1 tick" to measure out the correct amount.

3. Can I use "Just sqrt(x) with 1,2,3,4 ticks" with any ingredient?

Yes, "Just sqrt(x) with 1,2,3,4 ticks" can be used with any ingredient that requires measuring by weight, such as flour, sugar, or butter. It is not recommended for liquids, as they are typically measured by volume.

4. How accurate is "Just sqrt(x) with 1,2,3,4 ticks" for measuring ingredients?

"Just sqrt(x) with 1,2,3,4 ticks" is a very accurate way to measure ingredients, especially for smaller amounts. The increments of 1, 2, 3, or 4 ticks allow for precise measurements, making it easier to follow recipes and achieve consistent results.

5. Do I need a special tool to use "Just sqrt(x) with 1,2,3,4 ticks"?

No, you do not need a special tool to use "Just sqrt(x) with 1,2,3,4 ticks". Many kitchen scales and measuring cups have markings for these specific increments, or you can simply use a ruler or measuring spoons to estimate the tick increments.