Skip to main content
Tweeted twitter.com/StackMma/status/1337683655498604545
Became Hot Network Question
added 340 characters in body
Source Link
grading
  • 261
  • 1
  • 7

I have two plots, as seen below, Plot1 and Plot2 with a common x-axis. Each plot has a different range of y-axis and I overlay them. I want to remove the minor ticks from the frames of each plot and then overlay. How do I do this?

ClearAll["Global`*"]
xaxis1 = 0;
xaxis2 = #Both0.04;
yaxis1 Plot1= and0;
yaxis2 Plot2= have550;
PlotA a= commonPlot[{5000*Sa y+ 100 }, {Sa, xaxis1, xaxis2 }, 
  PlotStyle -axis> rangingRed, from 
 0 toPlotRange 0.4-> {{xaxis1, xaxis2}, {yaxis1, yaxis2}}, 
  LabelStyle -> Plot1{FontSize -> 12, Bold}, Frame -> True]

yaxis1 = Show[PlotA0;
yaxis2 = 0.8;
PlotB = Plot[{Sa^2 + Sa }, {Sa, xaxis1, xaxis2 }, PlotStyle -> Blue, 
  PlotRange -> {{xaxis1, xaxis2}, {yaxis1, yaxis2}}, 
  LabelStyle -> {FontSize -> 10.512, Bold}, Frame -> True]

Plot1 = Show[PlotA, LabelStyle -> {FontSize -> 10.5, Bold},  
   Frame -> {{True, False}, {True, True}}, ImagePadding -> 40, 
       FrameTicks -> {{All, All}, {All, None}}, AspectRatio -> 1];
    ##Plot1 y range is from 0 to 550 needed with breaks on 100


    Plot2 = Show[PlotB, 
       LabelStyle -> {FontSize -> 10.5, Bold}, 
       FrameTicks -> {{None, All}, {None, All}}, 
       Frame -> {{False, True}, {False, False}}, ImagePadding -> 40, 
       FrameStyle -> {{Automatic, Blue}, {Automatic, Automatic}}, 
       AspectRatio -> 1];

     ##Plot2 y range is from 0 to 0.8 needed with breaks on 0.2
    
    Overlay[{Plot1, Plot2}]

enter image description here

I have two plots, as seen below, Plot1 and Plot2 with a common x-axis. Each plot has a different range of y-axis and I overlay them. I want to remove the minor ticks from the frames of each plot and then overlay. How do I do this?

    #Both Plot1 and Plot2 have a common y-axis ranging from 0 to 0.4 
    Plot1 = Show[PlotA, 
       LabelStyle -> {FontSize -> 10.5, Bold},  
       Frame -> {{True, False}, {True, True}}, ImagePadding -> 40, 
       FrameTicks -> {{All, All}, {All, None}}, AspectRatio -> 1];
    ##Plot1 y range is from 0 to 550 needed with breaks on 100


    Plot2 = Show[PlotB, 
       LabelStyle -> {FontSize -> 10.5, Bold}, 
       FrameTicks -> {{None, All}, {None, All}}, 
       Frame -> {{False, True}, {False, False}}, ImagePadding -> 40, 
       FrameStyle -> {{Automatic, Blue}, {Automatic, Automatic}}, 
       AspectRatio -> 1];

     ##Plot2 y range is from 0 to 0.8 needed with breaks on 0.2
    
    Overlay[{Plot1, Plot2}]

I have two plots, as seen below, Plot1 and Plot2 with a common x-axis. Each plot has a different range of y-axis and I overlay them. I want to remove the minor ticks from the frames of each plot and then overlay. How do I do this?

ClearAll["Global`*"]
xaxis1 = 0;
xaxis2 = 0.04;
yaxis1 = 0;
yaxis2 = 550;
PlotA = Plot[{5000*Sa + 100 }, {Sa, xaxis1, xaxis2 }, 
  PlotStyle -> Red,  
  PlotRange -> {{xaxis1, xaxis2}, {yaxis1, yaxis2}}, 
  LabelStyle -> {FontSize -> 12, Bold}, Frame -> True]

yaxis1 = 0;
yaxis2 = 0.8;
PlotB = Plot[{Sa^2 + Sa }, {Sa, xaxis1, xaxis2 }, PlotStyle -> Blue, 
  PlotRange -> {{xaxis1, xaxis2}, {yaxis1, yaxis2}}, 
  LabelStyle -> {FontSize -> 12, Bold}, Frame -> True]

Plot1 = Show[PlotA, LabelStyle -> {FontSize -> 10.5, Bold},  
   Frame -> {{True, False}, {True, True}}, ImagePadding -> 40, 
   FrameTicks -> {{All, All}, {All, None}}, AspectRatio -> 1];

Plot2 = Show[PlotB, LabelStyle -> {FontSize -> 10.5, Bold}, 
   FrameTicks -> {{None, All}, {None, All}}, 
   Frame -> {{False, True}, {False, False}}, ImagePadding -> 40, 
   FrameStyle -> {{Automatic, Blue}, {Automatic, Automatic}}, 
   AspectRatio -> 1];
Overlay[{Plot1, Plot2}]

enter image description here

Source Link
grading
  • 261
  • 1
  • 7

How to remove minor ticks from "Framed" plots and overlay two plots?

I have two plots, as seen below, Plot1 and Plot2 with a common x-axis. Each plot has a different range of y-axis and I overlay them. I want to remove the minor ticks from the frames of each plot and then overlay. How do I do this?

    #Both Plot1 and Plot2 have a common y-axis ranging from 0 to 0.4 
    Plot1 = Show[PlotA, 
       LabelStyle -> {FontSize -> 10.5, Bold},  
       Frame -> {{True, False}, {True, True}}, ImagePadding -> 40, 
       FrameTicks -> {{All, All}, {All, None}}, AspectRatio -> 1];
    ##Plot1 y range is from 0 to 550 needed with breaks on 100


    Plot2 = Show[PlotB, 
       LabelStyle -> {FontSize -> 10.5, Bold}, 
       FrameTicks -> {{None, All}, {None, All}}, 
       Frame -> {{False, True}, {False, False}}, ImagePadding -> 40, 
       FrameStyle -> {{Automatic, Blue}, {Automatic, Automatic}}, 
       AspectRatio -> 1];

     ##Plot2 y range is from 0 to 0.8 needed with breaks on 0.2
    
    Overlay[{Plot1, Plot2}]