Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.4K Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

PlotRange function problem

Posted 10 years ago

I am trying to graph a few linear functions and restrict their x and y ranges from 0 to 50, so I use the command:

Plot[{x, 4*x, 3*x/2, (4/3)*(x - 10)}, {x, 0, 50}, PlotRange (backslash)[Rule] {0, 50}]

However, Mathematica is interpreting this as Plot[x^2, {x, -1.2, 1.2}]. It's probably not a problem with any of the functions, as without PlotRange, it seems to work fine.

POSTED BY: Sham Mahmud
4 Replies

Copy and paste the code I displayed in my original reply; it should work just fine.

When you want to enter the abbreviation for Rule in an Input cell, type a hyphen (-) then a greater-than (>). The combination will automatically change to the correct symbol. Ditto if in the Input cell you type the longer form \[Rule].

POSTED BY: Murray Eisenberg
Posted 10 years ago
POSTED BY: Bill Simpson
Posted 10 years ago

Strange, I typed in the exact same thing as you did, but I'm still getting the same output as I originally posted.

POSTED BY: Sham Mahmud

Seems to work OK:

Plot[{x, 4 x, 3 x/2, (4/3)*(x - 10)}, {x, 0, 50}, PlotRange -> {0, 50}]

enter image description here

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