MATLAB Answers


handle graphics in R2014

Asked by Daniel
on 24 Jan 2015
Latest activity Commented on by Star Strider
on 24 Jan 2015
I have an enormous amount of Matlab code that I use on a regular basis for data analysis, including plotting routines. I find that the graphics produced by R2014 are structured so differently from all the previous releases I have used (going back to 2003) that many of my graphics programs simply don't work. For example, 'findobj' fails to find the colorbar in a figure containing an 'imagesc' plot, and so my color scale adjusting program crashes. Another example: a program that formats data to spec and then plots waveforms produces extra empty figure windows. I don't have these problems in any previous release, so I have gone back to using R2013b. Any advice going forward? Just keep using R2013b until it's no longer supported, and then rewrite my entire code base (yuk!)?

  1 Comment

Yes, in R2014b came with a new graphics system, see Graphics Changes in R2014b.
I added a tag, r2014bgraphics, to this question. Click it in the Tags.

Sign in to comment.

1 Answer

Answer by Chad Greene
on 24 Jan 2015

Indeed, the changes in 2014b have been been a source of frustration for many of us. Here's a bit about the new colorbar structure. In some ways, the colorbar change makes sense. Why should colorbars be axes of their own, when they describe colors on another set of axes? That's was a silly structure, but it was built into the way handle graphics work long ago. At some point TMW had to decide, "do we keep building onto this structure that does not make sense, or do we create a more intuitive structure and build from there?" There's never a perfect answer to that question.
The longer you stick with 2013b, the harder it will be to switch later on, because you'll want any new codes you write today to work with the new graphics system when you do make the switch. You don't necessarily need to rewrite all of your old codes, but you could make the switch to 2014b (or 2015a which has a few kinks worked out) and when you run into a problem, make use of if verLessThan('matlab','8.4.0') statements.


"make use of if verLessThan('matlab','8.4.0') statements." &nbsp Is there a "HG1" switch in R2014b?
My ‘HG1’ switch is to not uninstall R2014a!

Sign in to comment.