Message Boards Message Boards

0
|
2563 Views
|
3 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Create a linear path plot?

Posted 5 years ago

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}]
POSTED BY: John White
3 Replies

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

PlotPath[psp, Frame -> True, ImageSize -> Large]
POSTED BY: Henrik Schachner
Posted 5 years ago

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

POSTED BY: John White
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