I am currently using the ListPlot command in Mathematica to create a plot of some data. My goal is to adjust the opacity of the joined dashed line and the filling color differently, but I'm having trouble achieving the desired effect. Unfortunately, I have failed to modify the opacity of the filling color without affecting the dashed boundary. This has made it difficult to clearly see the boundary. I'm wondering if there's any way to increase the opacity of the joined dashed line without altering the opacity of the filling color (in the attached image it is 0.1). Any advice or suggestions would be greatly appreciated. Thank you in advance.

F = {{1, 3}, {2, 7}, {3, 2}};
G = {{1, 4}, {2.1, 3}, {2.9, 3}};
ListLogPlot[{F, G}, Filling -> Bottom, Joined -> True, 
 PlotStyle -> { {Lighter[Green, 0.1]     , Dashing[0.03], 
    Thickness[0.02], Opacity[0.1]}, {Lighter[Red, 0.01]     , 
    Dashing[0.03], Thickness[0.01], Opacity[0.1]}}(*,

enter image description here


1 Answer 1

ListLogPlot[{F, G}
 , PlotStyle -> {
   {Opacity[0.9, Darker@Darker@Green], Dashing[0.03], Thickness[0.005]}
   , {Opacity[0.9, Darker@Red], Dashing[0.02], Thickness[0.002]}
 , Filling -> {
   {1 -> {Bottom, Directive[Opacity[0.1, Lighter[Green]]]}}
   , {2 -> {Bottom, Directive[Opacity[0.1, Lighter[Red]]]}}
 , Joined -> True

enter image description here

  • $\begingroup$ Thanks for the help. $\endgroup$
    – PoreyS
    May 3, 2023 at 14:42
  • $\begingroup$ @PoreyS I am glad I was able to do so. Thanks for the accept. $\endgroup$
    – Syed
    May 3, 2023 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.