(* ::Package:: *)

(*Moje knihovna - nekrast*)

BeginPackage["MatrixLibrary`"]
matrixPlot::usage="Vylepsene kresleni matic"
Options[matrixPlot]:=Flatten[{DisplayValue->True,Options[MatrixPlot]}]


Begin["Private`"]

matrixPlot::notMatrix="Neni matice!!";
matrixPlot[m_?MatrixQ, opts:OptionsPattern[]]:=Module[{pl1,pl2},


pl1=MatrixPlot[m, FilterRules[{opts},Options[MatrixPlot]]];

pl2=Graphics[Table[Text[m[[i,j]],{1/2+j-1,Dimensions[m][[2]]-i-1/2}],{i,Dimensions[m][[1]]},{j,Dimensions[m][[2]]}]];

If[OptionValue[DisplayValue],Show[pl1,pl2],pl1]
]

SyntaxInformation[matrixPlot]={"ArgumentsPattern"->{_,OptionsPattern[]}}

matrixPlot[m_, opts:OptionsPattern[]]:=Message[matrixPlot::notMatrix];


End[]
EndPackage[]
