New answers tagged

4

I think what you want is: Plot[Evaluate[{x^2, x}], {x, 1, 2}, PlotRange -> All, Filling -> {1 -> {2}}, PlotStyle->{Blue, Blue} ]


4

The issue caused by differing vertical positions of Axis across plots with filling. plotswithfilling = Table[ Plot[PDF[NormalDistribution[i, 1], x] Exp[-Sqrt[i]/4] /. i -> Range[1, 3, 2] // Evaluate, {x, k, k + 1}, PlotRange -> Full, Filling -> Axis, Axes -> None, PlotStyle -> {ColorData[10][4 + k], Darker[ColorData[...


2

This is very closely related to this question. Here is a version of kglr's answer adapted to your problem: ListPlot[{ (*Horizontal line 1*){{0, 5}, {35, 5}}, (*Horizontal line 2*){{0, 10}, {35, 10}}, (*Vertical line 3*){{5, 0}, {5, 35}}, (*Vertical line 4*){{10, 0}, {10, 35}}, (*Horizontal line 5*){{0, 0}, {5, 0}} }, Joined -> True, Filling ...


4

threshold = 1.; Plot[{x^2, x^2/6, ConditionalExpression[0, x <= threshold]}, {x, 0, 2}, PlotStyle -> {Automatic, Orange, None}, Filling -> {2 -> {{3}, {None, LightOrange}}}, PlotRange -> {0, 1}] and Plot[{x^2, x^2/6, Boole[x > threshold ]}, {x, 0, 2}, Exclusions -> {{threshold }}, PlotStyle -> {Automatic, Orange, None}, ...


4

An alternative approach using a single ParametricPlot3D: ClearAll[f1, f2, f3, f4, f5] f1[x_, y_] := {x Sin[x], x Cos[x], -(x/3)} f2[x_, y_] := {Sqrt[y] x Sin[x], y^2 x Cos[x], -(x/3)} f3[x_, y_] := {Sqrt[y] x Sin[x], y^2 x Cos[x], -((x*y^2)/3)} f4[r_: {1, 1.15}][x_, y_] := Module[{t = Rescale[y, r]}, t f2[x, r[[2]]] + (1 - t) f3[x, r[[2]]]] f5[r_: {...


5

You need to interpolate between the two bounding curves. One way to do this is to multiply one of the bounding curves by $t$, multiply the other by $(1-t)$, and create a ParametricPlot running from $t = 0$ to 1. originalplot = ParametricPlot3D[ { {x*Sin[x], x*Cos[x], -(x/3)}, {Sqrt[y]*x*Sin[x], y^2*x*Cos[x], -(x/3)}, {Sqrt[y]*x*Sin[x], y^...


8

Perhaps you're looking for something like this: Plot[{ ConditionalExpression[x^2, x < 1], ConditionalExpression[x^2, x > 1], ConditionalExpression[2 + 2 x^2, x < 1] }, {x, 0, 2}, Filling -> {1 -> Bottom} ]


4

If you have version 12.+, you can also use Around to process data1 and use ListLinePlot with the options IntervalMarkers and IntervalMarkersStyle: data1b = Around[#, {#3, #2} - #] & @@@ data1; ListLinePlot[data1b, IntervalMarkers -> "Bands", IntervalMarkersStyle -> Pink, PlotRangePadding -> {Automatic, {Automatic, Scaled[.1]}}]


8

ListLinePlot[Transpose[data1], PlotStyle -> {Directive[Thick, Blue], Directive[Red], Directive[Red]}, Filling -> {2 -> {3}}, FillingStyle -> {Opacity[.25], Pink}, PlotTheme -> "Detailed"]


Top 50 recent answers are included