Tag Info

New answers tagged

4

Try this: a = Import["ExampleData/lena.tif"]; Manipulate[ Row[{Image[a, ImageSize -> 80] , Show[ParametricPlot3D[ r*{Cos[u]*Sin[v], Cos[u]*Cos[v], Sin[u]}, {u, -Pi/2, Pi/2}, {v, 0, 2 Pi}, PlotRange -> {-9, 9}, PerformanceGoal -> "Quality", PlotStyle -> {Directive[Yellow, Opacity[0.74]]}]]}], {r, 3, 6}] Putting the ...


0

Alternately, if you're just planning on using the barebones function Image, you could do something like this: col = Compile[{{z, _Real}}, {Sign[z]/4 + 1, Exp[1 - Max[Abs[z], 1]], Min[Abs[z], 1]}, RuntimeAttributes -> {Listable}] which produces a basic red-blue color scheme in Hue colorspace. Example usage: Image[hue@Table[Sin[x] Sin[y], {x, 0, 10, ...


1

Use ColorFunction. Plot[Sin[500 x], {x, 0, 1}, ColorFunction -> Function[{x, y}, Piecewise[ {{RGBColor[0, 0, 1 - 2 y], 0 <= y < .5}, {RGBColor[2 (y - .5), 0, 0], .5 <= y <= 1}} ] ] ] A bit ugly, but you get the idea. Here the line of the plot is colored based on the y coordinate. The ...


5

You can use the result of FindGeometricTransform to adjust the PlotRange. Starting with the same images: imgOriginal = ImageTake[ExampleData[{"TestImage", "Aerial"}], {1, -2}, {2, -1}]; img1 = ImageTake[imgOriginal, {0, 160}]; img2 = ImageTake[imgOriginal, {-160, -1}]; Finding the transformation with tr = FindGeometricTransform[img1, img2, ...


3

Here is a simple way to do it usingMulticolumn, which is new in V10. I use a 4 x 4 grid with a list of three pictures Multicolumn[ Item[PopupWindow[#, #, WindowSize -> {All, All}], ItemSize -> 10] & /@ pictlist, 2, Frame -> All] And clicking on one the thumbnails produces


2

Here's a small example: image := Graphics[{Hue@RandomReal[], Rectangle[]}, ImageSize -> 50] images[n_] := Partition[PadRight[Table[image, {n}], n + 8 - Mod[n, 8], Null], 8]; The key is that Null gives a blank space when used in GraphicsGrid. I agree with Zviovich that PopupWindow is the best way to achieve what you ask for when it comes to displaying ...


3

GraphicsGrid[ Partition[ Join[PopupWindow[#, #] & /@ pictlist, ConstantArray["", Mod[Length@pictlist, 8]]], 8], Frame -> All, ImageSize -> 800]


3

Another approach (from this answer) is to re-set the value of the option ImageSizeMultipliers to {1.,1.} : image = ImageResize[Import["ExampleData/lena.tif"], 250]; image2 = ImageResize[ExampleData[{"TestImage", "Mandrill"}], 150]; With the default settings image image2 Grid[{{"abcd", image, image2}}] gives After evaluating ...


0

Thank you for your help. I have come up with something that is almost what I am looking for: Photo = RandomReal[1, {50, 50}]; Manipulate[ ArrayPlot[Photo, ColorRules -> {y_ /; y < a -> Purple, y_ /; y < b -> Red, y_ /; y < c -> Blue}], {a, 0, 1}, {b, 0, 1}, {c, 0, 1}] What I would like to do is instead of using ArrayPlot ...


0

How about using ChartElements instead of ChartLabels. images = ExampleData[{"TestImage", #}] & /@ {"Lena", "Mandrill"}; BarChart[{{1, 2, 3}, {4, 5, 6}}, ChartElements -> {images, None}]


7

Here is something 10 x faster. I made the same assumption as george2079 so for each subinterval whole color scheme is used not just exact part like in Simon's answer. Maybe useful, maybe not. Usage colorF ~ createColorFunction ~ {"TemperatureMap", "AvocadoColors"}; pic = Image@ConstantArray[Range[0, 1, .001], 100] Colorize[pic, ColorFunction -> ...


3

You can use Colorize for this Colorize[RandomImage[1, {10, 10}], ColorFunction -> (Piecewise[ {{ColorData["AlpineColors"][#], 0 < # < .5}, {ColorData["SouthwestColors"][#], .5 < # < 1}}] &)]


2

One approach: ImageApply[ List @@ Piecewise[{ {ColorData["AlpineColors"][2 #], 0 < # < .5}, {ColorData["SouthwestColors"][2 # - 1 ], .5 < # < 1} }] &, Image[RandomReal[1, {10, 10}]]] or Image[Map[ List @@ Piecewise[{ {ColorData["AlpineColors"][2 #], 0 < # < .5}, ...


2

After you draw one or more selection rectangles and click away from the image they are still there suspended in a xenon mist but they are only visible if you look dead ahead use the selection tool. We can extract that data from the underlying Cell expression with this Button: Button["Copy ImageMarkers", Cases[ NotebookRead[SelectedNotebook[]], ...


3

data = RandomInteger[1, {300, 300}]; Image[data] or Graphics[Raster[data]] You can also try: ArrayPlot[data] RandomImage[BernoulliDistribution[1/2], {300, 300}] etc.


1

ListDensityPlot[Table[RandomInteger[{0, 1}], {100}, {100}], InterpolationOrder -> 0, ColorFunction -> GrayLevel]



Top 50 recent answers are included