Message Boards Message Boards

GROUPS:

Create a linear path plot?

Posted 1 month ago
305 Views
|
3 Replies
|
3 Total Likes
|

In the following I expected a graphic to display of 4 points connected by straight-line segments, however nothing happens.

In[1]:= PlotPath[path_, options__] :=
 Module[{argand = Map[{Re[#], Im[#]} &, path]},
  grdata = {Line[argand],
    {PointSize[0.03], Map[Point, argand]}};
  Show[Graphics[grdata, AspectRatio -> 1,
    Axes -> True, options]]]

psp = {1, I, -1, -I}; PlotPath[psp]


Out[2]= PlotPath[{1, I, -1, -I}]
3 Replies

You are missing the second argument(s) (i.e. "options"), try:

PlotPath[psp, Frame -> True, ImageSize -> Large]
Posted 1 month ago

I know where I went wrong now. To make it optional I should have had 3 underscore characters but I only had 2.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract