Message Boards Message Boards

0
|
6372 Views
|
6 Replies
|
6 Total Likes
View groups...
Share
Share this post:

Flip the x-axis from minus values to positive?

Hi all, I am trying to plot a diagram on x-axis and directed to the left. which means the diagram starts from zero to positive 15 where zero in the right side and all numbers to 15 is on the left. I already did it but the numbers appeared on negative values. if any one could give a thought it would be appreciated.

Cheers

Attachments:
6 Replies

Use ScalingFunctions:

Plot[x^2, {x, 0, 10}, ScalingFunctions -> {"Reverse", None}]

Regards

Neil

POSTED BY: Neil Singer

Exactly what I need. now the spectrum in positive as it should be. appreciated

Have a look at

Plot[x^2, {x, -5, 0}, 
 Ticks -> {Table[{-j, j}, {j, 0, 5, .5}], Automatic}]

here is specifiesd where to put ticks on the negative axis and what they should lool like. The effect is the function "drawn to the left"

POSTED BY: Hans Dolhaine

yes this works it makes the values increases in positive and directed to the left thank you very much

You can assign your choice of tick labels with the Ticks option:

Ticks -> {Table[{i, -i}, {i, -15, 4}], Automatic}
POSTED BY: Gianluca Gorni

Thank you for your reply I did not know how to use it

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