Message Boards Message Boards

0
|
3062 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

Creating a line graph using the Manipulate command.

Posted 11 years ago
The beginning of the question asks:
Using two-dimensional (Graphics[]), create a straight Line[] with points that divide it into twelve equal-length segments. Use the option VertexColors with alternating colors. This will help you see where the vertices (your points) are. This will help you keep track of what you are doing in the next step. Use the points that define this line as your initial vertices. 

I have.
Graphics[{Thin,
Line[{{1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}, {8, 0}, {9, 0}, {10, 0}, {11, 0}, {12, 0}},
VertexColors -> {Red, Blue, Orange, Green, Red, Blue, Orange,
Green, Red, Blue, Orange, Green}]}]

The second part, which is the part I am having trouble with asks.
Using two-dimensional (Graphics[]), create a straight Line[] with points that divide it into twelve equal-length segments. Use the option VertexColors with alternating colors. This will help you see where the vertices (your points) are. This will help you keep track of what you are doing in the next step. Use the points that define this line as your initial vertices.   

I have
Manipulate[
Plot [Thin,
Line[{{1/(1 - a*f), 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}, {8, 0}, {9, 0}, {10, 0}, {11, 0}, {12/(a*f), 0}}], {f, 0, 1}], {a, 0, 1}]

I am not sure how to make this work.  I went on the Mathematica help site for the manipulate command and tried to make my graph appear in the form written and this is what I get.  Not sure why it wants more expressions.  I didn't even want to add the "a" in.
POSTED BY: Megan Vineyard
The two questions are the same. 

In the second code segment, you need Graphics instead of Plot.
POSTED BY: Bruce Miller
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