parametricplot in pstricks

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

parametricplot in pstricks

Nitecki, Zbigniew H.
What is wrong here?  using pstricks, pst-plot and \pst-math, the following command
\parametricplot[plotstyle=curve, plotpoints=50]{-1.8}{1.8}{0.25 t Pi mul mul cos t}
which should create a curve opening left, creates a vertical line.

Minimal example:


Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
my office     (617) 627-3843
dept. off.    (617) 627-3234
dept. fax    (617) 627-3966

http://sites.tufts.edu/znitecki/


----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

PstTest6.tex (752 bytes) Download Attachment
PstTest6.log (15K) Download Attachment
PstTest6.pdf (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: parametricplot in pstricks

Michael Sharpe


> On Sep 10, 2018, at 8:27 AM, Nitecki, Zbigniew H. <[hidden email]> wrote:
>
> What is wrong here?  using pstricks, pst-plot and \pst-math, the following command
>> \parametricplot[plotstyle=curve, plotpoints=50]{-1.8}{1.8}{0.25 t Pi mul mul cos t}
> which should create a curve opening left, creates a vertical line.
>
> Minimal example:
>


Remember that cos in Postscript expects its argument in degrees, so you may wish to use instead

\parametricplot[plotstyle=curve, plotpoints=50]{-1.8}{1.8}{0.25 t 180 mul mul cos t}

Michael

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: parametricplot in pstricks

Nitecki, Zbigniew H.
Yes, but that is not the problem here.  I guess I did mix up cos and COS, but either way I should get a curve, not a line.


Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
my office     (617) 627-3843
dept. off.    (617) 627-3234
dept. fax    (617) 627-3966

http://sites.tufts.edu/znitecki/

On Sep 10, 2018, at 12:16 PM, Michael Sharpe <[hidden email]> wrote:



On Sep 10, 2018, at 8:27 AM, Nitecki, Zbigniew H. <[hidden email]> wrote:

What is wrong here?  using pstricks, pst-plot and \pst-math, the following command
\parametricplot[plotstyle=curve, plotpoints=50]{-1.8}{1.8}{0.25 t Pi mul mul cos t}
which should create a curve opening left, creates a vertical line.

Minimal example:



Remember that cos in Postscript expects its argument in degrees, so you may wish to use instead

\parametricplot[plotstyle=curve, plotpoints=50]{-1.8}{1.8}{0.25 t 180 mul mul cos t}

Michael

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
               https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex


----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Reply | Threaded
Open this post in threaded view
|

Re: parametricplot in pstricks

Nitecki, Zbigniew H.
In reply to this post by Michael Sharpe
My apologies.  You are right—I thought I was getting the line using either one, but when I replaced cos (degrees) with COS(radians), the line curved.
MY BAD!

Z

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
my office     (617) 627-3843
dept. off.    (617) 627-3234
dept. fax    (617) 627-3966

http://sites.tufts.edu/znitecki/

On Sep 10, 2018, at 12:16 PM, Michael Sharpe <[hidden email]> wrote:



On Sep 10, 2018, at 8:27 AM, Nitecki, Zbigniew H. <[hidden email]> wrote:

What is wrong here?  using pstricks, pst-plot and \pst-math, the following command
\parametricplot[plotstyle=curve, plotpoints=50]{-1.8}{1.8}{0.25 t Pi mul mul cos t}
which should create a curve opening left, creates a vertical line.

Minimal example:



Remember that cos in Postscript expects its argument in degrees, so you may wish to use instead

\parametricplot[plotstyle=curve, plotpoints=50]{-1.8}{1.8}{0.25 t 180 mul mul cos t}

Michael

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
               https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex


----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
                https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex