Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 18476

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
votes
ϵ = 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.
18
votes
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.
23
votes
[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.
7
votes
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.
14
votes
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.
9
votes
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.
28
votes
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.
5
votes
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.
11
votes
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.
5
votes
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.
3
votes
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.
9
votes
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.
6
votes
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.
3
votes
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.
2
votes
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