Tag Info

Hot answers tagged

16

One key function you might need is the (undocumented) function Graphics`Mesh`InPolygonQ[], which tests if a point is inside a given polygon. With it, and a few other tweaks, here's my version of weatherMap[]: weatherMap[region_String, property_String, res_Integer: 25, opts___] := Module[{fmin, cmax, coords, pts, minLong, maxLong, minLat, maxLat, ...


13

If you want it to look like your NOAA example, that's not a ContourPlot[]. It's a DensityPlot[] using a modified Hue[] function for the ColorFunction. E.g. something like: Show[ListDensityPlot[{#4, #3, #5} & @@@ Select[maxt, #[[5]] < 9999 &], ColorFunctionScaling -> False, ColorFunction -> Function[{x}, Hue[Clip[(100 - x)/60, {0, ...


10

I am writing this answer for a person who is familiar with Mathematica and has a good understanding of computer programming, but not so familiar with Java programming language. Using GraphStream is not so different from using any other Java library. You need to download the GraphStream core files from here and extract it. gs-core-1.1.2.jar is the only file ...


9

Nice answer by Mohsen, +1. I am continually impressed by the quality of the J/Link and .NET/Link expertise on this site. I have a couple remarks and then an example program. The question asked about some general tips for getting started with J/Link. This GraphStream library provides a perfect example for the typical workflow of a J/Link project. The ...


7

You can use ArrayPlot or MatrixPlot. Note that Mesh setting is optional. It works well if squares are large, but should not be used for small square sizes. MatrixPlot is very intelligent for large arrays of data - it deduces best approximate visual form: "sufficiently large or sparse matrices are downsampled so that their structure is visible in the plot" ~ ...


6

Here's an example using defined distributions: Plot3D[PDF[BinormalDistribution[.3], {x, y}], {x, -3, 3}, {y, -3, 3}, Mesh -> None, PlotStyle -> ColorData[45, 1], PlotLabel -> "Multinormal", ColorFunction -> (ColorData["DarkRainbow"][#3] &)] or: DensityPlot[ PDF[BinormalDistribution[.3], {x, y}], {x, -3, 3}, {y, -3, 3}, ...


2

By using ViewVector you are rotating the point-of-view about the object, not the object itself. While these are similar, it might be easier to understand what's happening by rotating the object. This can be done: rotAbout={0, 0, 1}; Manipulate[rot = RotationMatrix[a, rotAbout]; Graphics3D[{Specularity[GrayLevel[1], 100], ...


2

ArrayPlot[]/MatrixPlot[] are the most straightforward ways to go about this. Alternatively, one could use Raster[] or Image[] for the purpose: BlockRandom[SeedRandom[42, Method -> "MersenneTwister"]; (* for reproducibility *) arr = RandomInteger[{0, 3}, {15, 20}]]; colorRules = Thread[Range[0, 3] -> List @@@ {Red, Green, Blue, Yellow}]; ...



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