Heat map + Numbers + Relative values per line
Jump to navigation
Jump to search
go back to Main Page, Computational Resources, MATHEMATICA, Scripts, Scripts for Mathematica 8
c1 = Import ["path/file.csv"] (*The file.csv must be in the shape matrix*)
Grid[c1] (*To see how the matrix looks like*)
c2 = c1[[2 ;; All, 2 ;; All]] (*To extract only the numerical part of the matrix *)
Grid[c2] (*To see how the numerical matrix looks like*)
l1 = c1[[2 ;; All, 1]] (*Width of a line*)
p1 = c1[[1, 2 ;; All]] (*Height of a column*)
c3 = Rescale [#] & /@ c2 (*Rescale[n1] per line*)
(*Heat map plotted Example--> Heat_map_II*) ImageComposet[ArrayPlot[c3, ColorFunction -> "RoseColors", ColorFunctionScaling -> True, Frame -> True, FrameStyle -> Opacity[0], AspectRatio -> 0.6, FrameTicks -> {{Transpose[{Range[Length[l1]], l1}], None}, {None, Transpose[{Range[Length[p1]], p1}]}}, FrameTicksStyle -> Directive[Opacity[1], Bold, FontSize -> 30, FontFamily -> "Times"], Mesh -> All, MeshStyle -> White, ImageSize -> 900], GraphicsGrid[c2, BaseStyle -> {"Times", 30, Bold, White}, AspectRatio -> 0.59, ImageSize -> 740], {505, 235}]
(*Generate lengend Example--> Legend_II*) q = DensityPlot[x, {x, 0, 1}, {y, 0, 0.1}, AspectRatio -> Automatic, FrameTicks -> None, ColorFunction -> "RoseColors", PlotRangePadding -> None]; l = Show[q, ImageSize -> 200, Frame -> True, FrameTicks -> {{None, None}, {{{0, Min[Min]}, {1, Max[Max]}}, None}}]
Cvargas 15:43, 13 Sept 2011