File Exchange Pick of the Week

Our best user submissions

Colored 3-d bar plots

bar4y.jpg

As I mention quite frequently, the best way to become Pick of the Week is to write code that solves a problem that I am having or a problem I think many other people are having. That is how I found bar4viaColor. The customer I was working with wanted to show some Z data that varied as a function of X and Y.

Normally, this would be a MESH or SURF plot.

mesh.jpg
surf.jpg

However, the twist was they did not want to interpolate between the known data points. This would point to BAR3.

bar3y.jpg

The final complication was that the height of the bar should dictate the color of the bar. This is possible, but not easy with BAR3. I just knew someone would have written the code to do this and posted it to MATLAB Central. I was right: bar4viaColor.

|
  • print

댓글

댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.