1
$\begingroup$

I am trying to plot the equations that describe the Cartesian locations of Bi-Cylinder coordinates. The equations are as follows:

x==(1.5 Sinh[n])/(Cosh[n]-Cos[p])   
y==(1.5 Sin[p])/(Cosh[n]-Cos[p])

I keep getting the following error

Options expected(instead of {p,0,2 pi}) in position 2 of Plot[{x,y},{n,-1,1},{p,0,2 pi},PlotRange All] an option must be a rule or a set of rules

I need help in understanding the error and how to rectify the situation and get the program to run correctly.

$\endgroup$
  • 1
    $\begingroup$ 1) Use Pi, not pi. Mathematica is case-sensitive. 2) What are you trying to plot exactly? $\endgroup$ – MarcoB Jun 21 '16 at 22:07
  • $\begingroup$ It's unclear what you want to visualize, but I like how ParametricPlot[{(1.5 Sinh[n])/(Cosh[n] - Cos[p]), (1.5 Sin[p])/(Cosh[n] - Cos[p])}, {n, -1, 1}, {p, 0, 2 Pi}] looks :) $\endgroup$ – BlacKow Jun 21 '16 at 22:11
2
$\begingroup$

Using approach suggested by @Mikado except Table is moved inside of ParametricPlot

ParametricPlot[
 Evaluate@
  Table[
   Tooltip[{
     (1.5 Sinh[n])/(Cosh[n] - Cos[p]),
     (1.5 Sin[p])/(Cosh[n] - Cos[p])},
    n],
   {n, -1, 1, 2/7}],
 {p, 0, 2 Pi},
 PlotRange -> All,
 AspectRatio -> Automatic,
 PlotLegends -> Range[-1, 1, 2/7]]

enter image description here

$\endgroup$
2
$\begingroup$

You need to use ParametricPlot. For example

Show[Table[ParametricPlot[{(1.5 Sinh[n])/(Cosh[n] - 
   Cos[p]), (1.5 Sin[p])/(Cosh[n] - Cos[p])}, {p, 0, 2 Pi}, 
   PlotRange -> All, AspectRatio -> Automatic], {n, -1, 1, 2/7}]]

gives

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.