# Search Results

Results tagged with Search options user 18476
20 results

Questions on the construction of 2D and 3D graphics through the direct use of primitives, directives, and functions. Include the graphics3d tag for questions specifically on 3D graphics. This tag is not to be used for basic questions on visualizing functions and lists using the various flavors of Plot commands.

ϵ = 0.1; func = NDSolveValue[{ϵ y''[x] + y'[x] + y[x]^2 == 0, y[0] == 0, y[1] == 1/2}, y, {x, 0, 1}] y2[x_] := 1/(x + 1) - (1 + 2 x) E^(-(x/ϵ)) + ϵ (2/(x + 1)^2 Log[2/(x + 1)] + …
answered Mar 27 '15 by Karsten 7.
A little simpler & shorter, but effectively the same as the answer by ybeltukov: g = Graphics[{Red, Rectangle[{0, 0}, {1, 3}], Blue, Polygon[{{1, 1}, {3, 1}, {2, 2}}]}, Frame -> True]; g … , which is more typical for Graphics, instead of the more general Sequence. g /. c_?ColorQ :> Directive[EdgeForm[c], FaceForm[]] …
answered Sep 7 '14 by Karsten 7.
[xPos]}, {range, range/GoldenRatio}]] Show[{Graphics@Circle[{xPos, f[xPos]}, {range, range/GoldenRatio}], Plot[f[x], {x, xPos - range, xPos + range}] /. Graphics[{{{}, {}, {formating__ … , line_Line}}}, stuff___] :> Graphics[{{{}, {}, {formating, Line[Pick[line[[1]], mf[line[[1]]]]]}}}, stuff]}, PlotRange -> All, ImageSize -> 200, AspectRatio -> 1, AxesOrigin -> {0, 0}] Plot …
answered Nov 29 '15 by Karsten 7.
Legended[Show[{g1, g2, g3}], SwatchLegend[{RGBColor[1, 0, 0], RGBColor[0, 0, 1], RGBColor[0, 1, 0], RGBColor[1, 0, 0], RGBColor[0, 0, 1], RGBColor[0, 1, 0], RGBColor[1, 0, 0], RGBColor[0, 0, 1], …
answered Nov 25 '15 by Karsten 7.
Here is one way, how you can make a Manipulate to dynamically change the magnified area and then use Setting to get the Plot together with the magnification parts as a static graphics object to be … exported. f = Sin; Manipulate[ Plot[f[x], {x, 0, 5}, Epilog -> {Transparent, EdgeForm[Thick], Disk[pos, {range, range/GoldenRatio}], Inset[Show[{Graphics@Circle[pos, {range, range …
answered Nov 29 '15 by Karsten 7.
You can make the Locators a part of the Graphics object instead of the Manipulate: Manipulate[pts = PadRight[pts, n, RandomReal[{-1, 1}, {15, 2}]]; disp = Graphics[{Polygon[pts], PlotRange -> 1 …
answered Mar 11 '15 by Karsten 7.
There are built-in magnifying glasses. However, spontaneously I don't know how to invoke one directly for a Plot. Therefore I'm going to demonstrate one way that converts the Plot Graphics object … ], {xx, First@MousePosition["Graphics", {0, 0}] - 0.1, First@MousePosition["Graphics", {0, 0}] + 0.1}, Frame -> True, Axes -> False, PlotRange -> All, ImageSize -> 400, Background -> None …
answered Nov 28 '15 by Karsten 7.
With the image of your plot graph = With[{grImp = Import["http://i.stack.imgur.com/KffdP.jpg"]}, ColorReplace[grImp, First@DominantColors@grImp -> Transparent] ]; and the im …
answered Aug 4 '14 by Karsten 7.
makeContours[barLegend_BarLegend] /; (Length[barLegend] =!= 2) := barLegend makeContours[barLegend_BarLegend] := Module[{colorScheme = barLegend[[1]], contourCount = barLegend[[2]]}, If[IntegerQ[ …
answered Oct 30 '15 by Karsten 7.
A version using Manipulate: Manipulate[ Graphics[{}, Axes -> True, AxesOrigin -> {0, 0}, PlotRange -> pr, GridLines -> Range @@@ Round@pr, GridLinesStyle -> LightGray], {{p, {0, 0}}, Locator … , TrackingFunction -> {p = MousePosition[{"Graphics", Graphics}, {0, 0}]; &, If[MousePosition["GraphicsScaled"] ∈ Rectangle[], pr += p - MousePosition[{"Graphics", Graphics}, {0, 0}]]; &, None}, Appearance -> None}, {{pr, {{-5, 5}, {-5, 5}}}, None}] …
answered Dec 29 '15 by Karsten 7.
Expanding eldos approach for even n to all integers > 0: cb[n_?EvenQ] := MatrixPlot[ArrayPad[DiagonalMatrix[{1, 1}], n/2 - 1, "Reflected"], PlotTheme -> "Monochrome"] cb[n_?OddQ] := MatrixPlot …
answered Sep 2 '14 by Karsten 7.
With Mathematica 10 you can use: ps[{l1_, l2_}] := Solve[p ∈ l1 ∧ p ∈ l2, p] and then points2 = Point[p] /. Map[ps[#] &, lines] // Flatten For a large number of lines ParallelMap should give an …
answered Jul 31 '14 by Karsten 7.
An illustrative example that demonstrates how the changing coordinate system can be handled. Manipulate[ Graphics[{Point[p], Locator[{0, 0}, Appearance -> Large], Red, AbsolutePointSize[5 … , p = #; &, (shift = shift + #; p = {0, 0}); &}}, {{shift, {0, 0}}, None}] The coordinate system of MousePosition is static. Manipulate[ Graphics[{AbsolutePointSize[5], Point[p], Locator …
answered Dec 27 '15 by Karsten 7.
One can add the option Appearance -> "Labeled" to a Slider2D to have the current values shown as an editable label. Manipulate[ Graphics[{PointSize[Large], Point[p]}, PlotRange -> 1], {{p, {1, 1 … }}, {-1, -1}, {1, 1}, Appearance -> "Labeled"}] Using two 1D Slider Manipulate[ Graphics[{PointSize[Large], Point[{px, py}]}, PlotRange -> 1], {{px, 1}, -1, 1, Slider, Appearance …
answered Jul 7 '15 by Karsten 7.
This should do it. leftTriangle = Magnify[Graphics[{Directive[ColorData[1][1], Opacity[0.5]], Triangle[{{-1, 1}, {0, 0}, {-1, -1}}]}, AlignmentPoint -> Left], 0.1]; rightTriangle = Magnify … [Graphics[{Directive[ColorData[1][1], Opacity[0.5]], Triangle[{{1, 1}, {0, 0}, {1, -1}}]}, AlignmentPoint -> Right], 0.1]; plot = Plot[Sin[x], {x, -Pi, Pi}, PlotRange -> {All, Automatic …
answered Jun 20 '15 by Karsten 7.

15 30 50 per page