# Black & white hash filling under curves

Posted 11 years ago
30472 Views
|
|
4 Total Likes
|
 My paper with Mathematica-created plots was submitted to a journal.They say I need to fill under a curve with something that shows wellwhen printed in black and white.  Can I use lines or dots?
 This is not built-in, but is straight-forward to add using the RegionPlot function. =====Filling with LinesStep one : create the two curves to be plotted together. ps=Plot[Sin,{x,0,2Pi},AspectRatio->Automatic,PlotStyle->Black]pc=Plot[Cos,{x,0,2Pi},AspectRatio->Automatic,PlotStyle->Black] Step two: use RegionPlot to create horizontal and vertical lines that fill the area between the curves and the x axis. The Mesh->n option gives the number of mesh lines, horizontal or vertical.   PlotStyle->None turns off coloring the region that RegionPlot derives. MeshStyle controls orientation (horizontal vs. vertical). rps=RegionPlot[ 0<=x<=2Pi && Abs<=Abs[Sin] && If[Sin>0,y>0,y<0], {x,0,2 Pi},{y,-1,1},       Mesh->12,MeshStyle->{None,Gray},BoundaryStyle->None,PlotStyle->None,AspectRatio->Automatic]rpc=RegionPlot[ 0<=x<=2Pi&&Abs<=Abs[Cos]&&If[Cos>0,y>0,y<0], {x,0,2 Pi},{y,-1,1},        Mesh->24,MeshStyle->{Gray,None},BoundaryStyle->None,PlotStyle->None,AspectRatio->Automatic] Step three: Combine them.  The overlap areas have cross-hatching. Show[{ps,rps,pc,rpc}] Filling with DotsPoints lined up vertically, rpc=RegionPlot[0<=x<=2Pi&&Abs<=Abs[Cos]&&If[Cos>0,y>0,y<0], {x,0,2 Pi},{y,-1,1},      Mesh->24, MeshStyle->{Directive[Gray,Dashing[{0.0,0.02}]],None},      BoundaryStyle->None,PlotStyle->None, AspectRatio->Automatic] Horizontal rows of points. (Maybe looks better.) rpc=RegionPlot[0<=x<=2Pi&&Abs<=Abs[Cos]&&If[Cos>0,y>0,y<0], {x,0,2 Pi},{y,-1,1},     Mesh->24, MeshStyle->{None,Directive[Gray,Dashing[{0.0,0.02}]]},    BoundaryStyle->None,PlotStyle->None, AspectRatio->Automatic]Combine with previous sine and cosine curves. Show[{ps,rps,pc,rpc}] 