# How can I plot a curve with a filled sub-domain? [duplicate]

How can I plot a curve with a filled sub-domain as shown below?

## marked as duplicate by Szabolcs, rhermans, MarcoB, LCarvalho, J. M. will be back soon♦ plotting StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Sep 9 '17 at 21:04

• Make two Plots with a different V range, use Filling in one, combine them with Show. What have you tried so far? Did you look at the Plot documentation? – Szabolcs Sep 9 '17 at 14:24
• closely related Q/A: Filling between boundaries – kglr Sep 9 '17 at 17:58

Let f be the function to plot. Define a 2nd function, g that restricts f to the given sub-domain. Use the fill option Filling -> 2 -> Axis.
f[x_] := 1/x^2