Graphics, Figures & Tables ⇒ plot curve
plot curve
Which option is the best for ploring curves(normal,polar, parametric,...), so that the you get just curve(nor coordinate system)?
NEW: TikZ book now 40% off at Amazon.com for a short time.
plot curve
If I recall this correctly you have been pointed to the mighty pgfplots more than one time. I suggest you study its documentation:
pgfplots.
Regards

Code: Select all
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[hide axis]
\addplot[mark=none] {x^2} ;
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[view={60}{30},hide axis]
\addplot3[mesh,z buffer=sort,samples=20,domain=-1:0,y domain=0:2*pi]
({sqrt(1-x^2) * cos(deg(y))},{sqrt( 1-x^2 ) * sin(deg(y))},x);
\end{axis}
\end{tikzpicture}
\end{document}
site moderator & package author
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
plot curve
You should learn to read manuals and also things that people write as answers to your questions. You have been already referred to respective packages and their manuals in other threads.
For details refer to the pgf/tikZ manual. For more sophisticated plotting take a look at pgfplots.
Thorsten
Code: Select all
\documentclass{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[domain=0:6.28]
\draw[color=blue,samples=50] plot[id=sin] (\x,sin(\x r);
\end{tikzpicture}
\end{document}
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
plot curve
With that, if I draw coordinate system(manually) curves does not go to the right place.cgnieder wrote:If I recall this correctly you have been pointed to the mighty pgfplots more than one time. I suggest you study its documentation:pgfplots.
RegardsCode: Select all
\documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[hide axis] \addplot[mark=none] {x^2} ; \end{axis} \end{tikzpicture} \begin{tikzpicture} \begin{axis}[view={60}{30},hide axis] \addplot3[mesh,z buffer=sort,samples=20,domain=-1:0,y domain=0:2*pi] ({sqrt(1-x^2) * cos(deg(y))},{sqrt( 1-x^2 ) * sin(deg(y))},x); \end{axis} \end{tikzpicture} \end{document}
localghost wrote:You should learn to read manuals and also things that people write as answers to your questions. You have been already referred to respective packages and their manuals in other threads.For details refer to the pgf/tikZ manual. For more sophisticated plotting take a look at pgfplots.Code: Select all
\documentclass{standalone} \usepackage[T1]{fontenc} \usepackage{tikz} \begin{document} \begin{tikzpicture}[domain=0:6.28] \draw[color=blue,samples=50] plot[id=sin] (\x,sin(\x r); \end{tikzpicture} \end{document}
Thorsten
This works, is it possible to use polar, pamatric plot and filling option with this?
plot curve
Since you're not showing any code I can only guess but I would bet you're somehow doing it wrong. The pgfplots package is extremely powerful and has loads and loads of options for customization. Look at Jake's article here for example or skim through these questions to see what is possible.ditka wrote:With that, if I draw coordinate system(manually) curves does not go to the right place.
Regards
site moderator & package author
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
plot curve
See Section 19 of the pgf/tikZ manual. But I think that you are better with pgfplots. And so the circle is complete.ditka wrote: This works, is it possible to use polar, pamatric plot and filling option with this?
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: plot curve
Okay,is it possible than to do that with pgf plots? The picture shoud look someething like this:
(the polar plot of curve r=theta/2)
(the polar plot of curve r=theta/2)
- Attachments
-
- ldfsalflfal.JPG (9.79 KiB) Viewed 9619 times
plot curve
I use this code:cgnieder wrote:Since you're not showing any code I can only guess but I would bet you're somehow doing it wrong. The pgfplots package is extremely powerful and has loads and loads of options for customization. Look at Jake's article here for example or skim through these questions to see what is possible.ditka wrote:With that, if I draw coordinate system(manually) curves does not go to the right place.
Regards
Code: Select all
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\draw[->] (-4,0) -- (4.2,0) node[right] {y};
\draw[->] (0,-4) -- (0,4.2) node[above] {x};
\begin{axis}[hide axis]
\addplot[mark=none] {x^2} ;
\end{axis}
\end{tikzpicture}
\end{document}
- Attachments
-
- dsdfsfafads.JPG (7.41 KiB) Viewed 9621 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
plot curve
Correct me when I'm wrong, but in your initial post you explicitly asked for curves without a coordinate system.
Addendum:
Your example can't work the way you want. You are drawing the axis in the
By the way, I don't understand why you want to draw the axis by hand and don't let pgfplots do the job. The
And now you present this sketch with a curve and an obvious coordinate system? And it's neither polar nor parametric, just Cartesian. Did I miss something? m(ditka wrote:Which option is the best for ploring curves(normal,polar, parametric,...), so that the you get just curve(nor coordinate system)?
Addendum:
Your example can't work the way you want. You are drawing the axis in the
tikzpicture
environment with intersection at (0,0)
, thus this is its origin. But you plot the curve inside the axis
environment, which has its lower left corner (not its origin) at (0,0)
. So it's not a surprise that the curve is not at the expected place.By the way, I don't understand why you want to draw the axis by hand and don't let pgfplots do the job. The
axis
environment is customizable in many ways. Perhaps you can clarify that.How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
plot curve
localghost wrote:Correct me when I'm wrong, but in your initial post you explicitly asked for curves without a coordinate system.And now you present this sketch with a curve and an obvious coordinate system? And it's neither polar nor parametric, just Cartesian. Did I miss something? m(ditka wrote:Which option is the best for ploring curves(normal,polar, parametric,...), so that the you get just curve(nor coordinate system)?
Addendum:
Your example can't work the way you want. You are drawing the axis in thetikzpicture
environment with intersection at(0,0)
, thus this is its origin. But you plot the curve inside theaxis
environment, which has its lower left corner (not its origin) at(0,0)
. So it's not a surprise that the curve is not at the expected place.
By the way, I don't understand why you want to draw the axis by hand and don't let pgfplots do the job. Theaxis
environment is customizable in many ways. Perhaps you can clarify that.
I want to plot coordinate axis manually, but both gnuplot and pgfplots do their coordinate system automatically. That is what I write that cooridnate axis shoud not be ploted. Anf it that option woud work for polar and parametric equations:
Code: Select all
\documentclass{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[domain=0:6.28]
\draw[color=blue,samples=50] plot[id=sin] (\x,sin(\x r);
\end{tikzpicture}
\end{document}
since I somehow conclue that I can not get polar and parametric plot like that and they can be ploted only with coordinate axis and so I plot the exaple, to se it that can be done?
coordinate system? And it's neither polar nor parametric, just Cartesian. Did I miss something? m(
The coodrinate system is cartesian, but the plot is not.
That is also one of the reasons, why I want to plot coordinate axis mannualy, so that I can make it in any way,regardless of plot on it.
So is it possible to draw the picture from example(using whatever)?