I have some data points that I want to plot and suppose I have the function ##f(x) = x##, with the domain having the range ##0\leq x \leq 10##. Assume that the experimental values lies in the range ##4\leq x \leq 7##, how can I put a rectangular region to cover this range behind my plot so as to show that range? The y-range should not be a trouble here since I plan to use a different option for that, so the rectangular region should just show the bound for the x-range.(adsbygoogle = window.adsbygoogle || []).push({});

For the y-range suppose the maximum value for y is 8, how can I put a dashed line to indicate the maximum y-value?

I have tried to use the epilog and prolog but they don't work, I mean just based on what I saw from some posts, but I'm really a newbie on this so it's not even worth a look. Maybe somebody can give me a basic example or guide?

Also, my data points are imported from excel, but let's just assume that the data points can be represented by the linear function above to make things simple; x,y values take on discrete values.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica Add a rectangle to a plot to indicate range

Tags:

Have something to add?

Draft saved
Draft deleted

Loading...

Similar Threads - rectangle plot indicate | Date |
---|---|

Plot a stereographic hypercube in a Mac's Grapher.app? | Yesterday at 8:22 AM |

Mathematica Errors when plotting but not when evaluating | Tuesday at 12:12 PM |

Mathematica Color Contour Plots | Mar 8, 2018 |

Mathematica: Inertia Tensor w/ 3-d Rectangle | Apr 25, 2012 |

Matlab rectangle | Dec 1, 2011 |

**Physics Forums - The Fusion of Science and Community**