How to place a colored rectangle in background of part of a figure which has a logarithmic axis

5 views (last 30 days)
I am trying to place a gray rectangle in the background of part of a figure. The figure has a logarithmic y-axis. I can place the rectangle just fine as long as I do not try to scale the axis. When I do that, I get the error message
Warning: Error updating Rectangle.
DataSpace or ColorSpace transform method failed.
Any suggestions? I have tried including the rectangle code before and after the rest of the commands for the figure.

Answers (0)

Categories

Find more on Line Plots in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!