Timeline for Plot that draws a dashed/solid curve depending on the y-value of the curve
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 6, 2015 at 20:34 | comment | added | Hanmyo | Thanks for the response. I think I'll post it as a separate question, as I'm looking to do something more complicated involving Abs. | |
| Feb 6, 2015 at 13:27 | comment | added | kglr | @Hanmyo, i am getting the same "weird results" with Abs[#2]&. I don't know why; maybe a bug? Meanwhile, a work-around is to use ListLinePlot[data, MeshFunctions -> {#2 &}, Mesh -> {{-1, 1}}, MeshShading -> {Blue, Directive[Red, Dashed]}, MeshStyle -> None]. Btw, thank you for the accept. | |
| Feb 6, 2015 at 8:45 | comment | added | Hanmyo | Thanks so much for the fast answer! Just a quick question about how to apply it. If I want to dash when the absolute value is greater than 1, this code produces weird results. Any idea? data = RandomReal[{-3, 3}, 100]; ListLinePlot[data, MeshFunctions -> {Abs[#2] &}, Mesh -> {{1}}, MeshShading -> {Blue, Directive[Red, Dashed]}, MeshStyle -> None] | |
| Feb 6, 2015 at 8:44 | vote | accept | Hanmyo | ||
| Feb 6, 2015 at 6:01 | history | answered | kglr | CC BY-SA 3.0 |