Hot answers tagged

4

You can supply any Graphics primitives directly to the Plot using Epilog Plot[f[x], {x, -2.5, 10}, Epilog -> {Blue, Thick, Dashed, Line[{{{1, 0}, {1, f[1]}}, {{0, f[1]}, {1, f[1]}}}]}] For your plot you can also put those point labels in using the Text graphics primitive, like Epilog -> {Text[Style["1/e", 13], {-.4, f[1]}], Blue, Thick, ...


3

One possibility : Plot[ If[x < 1, x^2, x^2 - 1], {x, 0, 2}, Mesh -> {{1.001}}, MeshFunctions -> {#1 &}, MeshShading -> {Blue, Red} ]


3

There are a number of ways of doing this by combining 2 curves. For example Plot[{If[x < 1, x^2], If[x > 1, x^2 - 1]}, {x, 0, 2}, PlotStyle -> {Red, Blue}] I don't know if there is a way where the colour information can be tagged to the values themselves.


3

(This is Daniel's answer from comments; it is interesting, it answers OP's question, and it generates pretty graphics, so it seems worth preserving) Plot3D[ quad, {x, 0, 1}, {y, 0, 1}, MeshFunctions -> {#3 &}, RegionFunction -> Function[{x, y, z}, 0 < Sqrt[3] x - y && 1.72 > Sqrt[3] x + y && z > 1100], PlotStyle -&...


3

Just in case anyone comes across this post in a search, here is a one-liner here for version 10 and after. If latlong is the list from the OP, then you can do this GeoGraphics[{Red, PointSize[.02], Point@GeoPosition@latlong}] The input for GeoGraphics is structured like that for Graphics, and you can use a whole host of options GeoGraphics[{Red, ...


3

For the fun of reproducing the original picture somewhat faithfully (yes, I can't seem to focus on real work this morning...): f[x_] := x/E^x; Plot[ f[x], {x, -2.5, 10}, Ticks -> { {0, 1}, {{1/E, Row[{Style["1/", FontFamily -> "Times"], Style["e", FontFamily -> "Times", Italic]}]}} }, TicksStyle -> Directive[Black, 12], PlotRange ->...


2

A tiny bit of modification on JasonB's answer Plot[f[x], {x, -2.5, 10}, Ticks -> {{1}, {1/E}}, GridLines -> Automatic, PlotStyle -> Black, AxesLabel -> {x, y}, Epilog -> {AbsolutePointSize[5], Point /@ {{1, 0}, {0, f[1]}}, Blue, Point[{1, f[1]}], Dashed, Line[{{{1, 0}, {1, f[1]}}, {{0, f[1]}, {1, f[1]}}}]}]


2

You can automate this, but obviously only if you have a predefined number of ticks for each image size. You can adjust the range of the ticks to cover all functions, out of bound ticks are not shown. k = { Small, Medium, Large}; l = {{Table[i, {i, 0, 2, 1}], Table[i, {i, 0, 4, 2}]}, Automatic, {Table[i, {i, 0, 2, 0.1}], Table[i, {i, 0, 4, 0.5}]}}; p1 := ...


1

Example Export["filename.png", yourgraph] Where "filename.png" filename is the name you want to give your file .png is file format and yourgraph is your Graph or Plot Alternatively, as @MarcoB has indicated you can do right-click on the plot and choose Save-as option to save your Plot or Graph as an image file.


1

So your RT1 is a matrix whose rows each have five plottable regions defined by conditional expressions, but when you plot them RegionPlot[#, {x, -15, 15}, {y, -15, 15}] & /@ RT1 only some of them plot. One way to fix this is to simply use a higher number of PlotPoints RegionPlot[RT1, {x, -15, 15}, {y, -15, 15}, PlotPoints -> 50] Edit One ...


1

In such cases, it is easier to do a variable transformation. logplot[var1_, var2_, func_] := Module[{f, z1, z2, l11, l12, l21, l22}, f = func /. {var1 -> 10.^z1, var2 -> 10.^z2}; l11 = Log10[4 10^3]; l12 = Log10[10^7]; l21 = Log10[.1]; l22 = Log10[1]; ContourPlot[f, {z1, l11, l12}, {z2, l21, l22}, FrameTicks -> {Table[{x, 10^ToString[x]}, {x,...



Only top voted, non community-wiki answers of a minimum length are eligible