MATLAB Answers

34

What happened to the figure toolbar in R2018b? Why is it an axes toolbar? How can I put the buttons back?

In R2018b, tools such as the zoom, pan, datatip, etc are no longer at the toolbar at the top of the figure window. These buttons are now in an "axes" toolbar and only appear when you hover your mouse over the plot. How do I put the buttons back at the top of the figure window?

Tags

No tags entered yet.

Products


Release

No release entered yet.

37 Answers

Answer by MathWorks Support Team on 16 Aug 2019 at 4:00
Edited by MathWorks Support Team on 16 Aug 2019 at 17:29
 Accepted Answer

In the R2018b release, you can drag-to-pan and scroll-to-zoom in an axes without having to call any MATLAB functions or select any toolbar buttons. Most types of axes include a default set of built-in interactions, but you can customize them by setting the Interactions property of the axes. For more information about controlling chart interactivity, see the following link:
You can also return the tools to the figure toolbar using the "addToolbarExplorationButtons" function. See the below example:
surf(peaks)
addToolbarExplorationButtons(gcf) % Adds buttons to figure toolbar
You can also hide or remove the axes toolbar with the code below:
ax = gca;
ax.Toolbar.Visible = 'off'; % Turns off the axes toolbar
%or
ax.Toolbar = []; % Removes axes toolbar data
If you would like to ensure that figures always open with the tools in the toolbar and that axes never contain a toolbar, execute the following code:
set(groot,'defaultFigureCreateFcn',@(fig,~)addToolbarExplorationButtons(fig))
set(groot,'defaultAxesCreateFcn',@(ax,~)set(ax.Toolbar,'Visible','off'))
The above settings will be reset when MATLAB re-starts. To ensure that these settings are used even after MATLAB re-starts, place the above "set" commands in a startup.m file. The startup.m file, when placed on the MATLAB Path, is run during the program start-up process. For more information about startup.m files, see the following link:
UPDATE (8/15/19):
Thank you for all of your comments and proposals about the axes toolbar.
We have heard your feedback and worked with members of the community on ways to improve the axes toolbar experience. With R2019a we released several enhancements to the axes toolbar, including faster startup time, ability to hover directly over the toolbar to make it visible, and improved performance with dense surface data. Additionally, with R2018b Update 5 we have made performance improvements to the axes toolbar startup time. We will continue to develop enhancements to the axes toolbar experience, and would like to thank you again for your feedback to help us improve our products.
You can download the latest updates using the following link:

  23 Comments

Every time an improvement is made to a piece of software, some people will invariably complain.
So let me add my two cents.
This was a stupid, stupid change.
Please put the zoom tools back in the toolbar by default. Like everyone else on this forum, I used them all the time and I can't believe you hid them.

Sign in to comment.


Answer by Felix Widmer on 25 Nov 2018
Edited by Felix Widmer on 25 Nov 2018

Please revert this change, this is absolutely idiotic. Seriously, you are not simplifying, but making scientific life worse by making us click more times to get what we want

  5 Comments

I don't like it either, but why should they remove it entirely? You can remove it via the startup script. That is more cumbersome than just ticking a box in the settings, but I don't see the big deal here. If it is detrimental to your work flow you should edit the startup script. If it is not detrimental to your work flow you should stop whining.
There is a working solution to revert this change on your copy, so what is the problem?
The only thing I would suggest is having a function that turns this off, so you can more easily toggle, whithout having to keep two copies of the startup script.
I don't like this DEFAULT functionality as well. I find myselt rushing with the cursor just to get in time before the toolbar disappears - cute but annoying. Please revert.
Not only is it not 'ideal', it's freaken stupid.. this makes backwards compatibility an issue when trying to distribute exacutables. This will litteraly keep certain companies from upgrading to newer matlab versions.

Sign in to comment.


Answer by Josh Wiebe on 7 Nov 2018

I don't understand why Mathworks would remove these much used items from the toolbar. Not even an option under the "view" tab to turn them back on...

  3 Comments

Absolutely right ! It looks like that they are working with imagination. Matlab is a scientific / professional program, not an Internet application.
Another very annoying thing is that it introduces a hidden AxisToolbar, this will make your program break when using axis handles. Have re-write all the program to deal with this not-even-complete hidden axis.
There was a time when the tools were located in the figure window and there was no toolstrip. That was great because it was very easy to do a quick zoom or rotate. Similar with various tools that could be put in the editor window rather than a toolstrip or quick toolbar. There are keyboard shortcuts for many of those but every time the interface suffers a significant change long time customers take a productivity hit.
There is nothing easy about using the tools like this to zoom and rotate since these icons normally would hide, hence making them less visible. Not to mention they don't appear at all when I am using the editing mode (mouse button).

Sign in to comment.


Answer by matlab trial on 25 Nov 2018

I'm so shocked someone thought this was a good idea.
Please put it back, it's an absurd change.

  0 Comments

Sign in to comment.


Answer by Arnold
on 28 Nov 2018

This is one of the most annoying changes I've seen yet from Mathworks. Why do you insist on breaking a perfectly functional user interface for some web 2.0 like garbage? The suggested "fix" is a cumbersome, poorly documented cludge, that, as TurqoiseInt points out, doesn't even work properly with subplots.
The fact that the missing features cannot be turned on through the View menu is worrisome and makes me think they will be completely eliminated in a future release.
I can't speak for others, but at this point, easy interactive plotting is one of the few things that keeps me on Matlab rather than moving to Python or Julia.
Seriously, folks. Fix this.

  2 Comments

I doubt they will. I had a direct phone conversation with the Mathworks guy who was in charge of the UX team that did the conversion to the tool strip. He had a bunch of reasons for doing that, mostly around attracting and keeping new customers. The company is just not run by mathematical scientists like founder Cleve Moler anymore. You can see that in the talks given at Matlab Expo, not just in the topics but in the list of presenters. We are not going to see a presentation by someone like Nick Trefethen or one of his Ph.D. students on Chebfun or whatever.
I doubt too that they will change back.
This change is more than annoying, I would say disgusting. We are using a scientific program or platform, not some fancy social media network applications.
But, we can do nothing.
One thing is certain, our team will not renew our Matlab licence, except there's serious change or option on this ----- You cannot just ask scientist to waste time on click buttons !!!!!

Sign in to comment.


Answer by Thomas Hoffend on 27 Nov 2018

This change is ridiculous. We went round and round over why going to a toolstrip was a bad idea and now it is worse.

  0 Comments

Sign in to comment.


Answer by Amir Moghadam on 27 Nov 2018

I have worked in a physics product development environment and when non-physicist Marketing more-ons took over the design of the software, it became extremeley frustrating for the physicists that developed the product and also the physicist users. And the company thought they were doing great cause marketing people showed their increasing sales which had nothing to do with their stupid new designs. I left that company cause they fell in some good amount of trouble giving so much authority to non-scientist marketers and I could do nothing to help.
I beleive Mathworks is falling in the same trap. Let's give non-scientist marketting the first say in the product design and it will be great.
Go Mathworks! great job screwing yourself! Matlab "The language for not technical, but marketin computing"
I bet to dose more-ons who decided to remove the bar, it seemed like that toolbar was too crowded and ugly looking probably, How about removing everything and putting a picture of nature instead of the graph I want to look at and inspect. wouldn't that make it even better looking!? LOL

  0 Comments

Sign in to comment.


Answer by Gleb Demin on 7 Dec 2018

Dear MATLAB team,
please, return old design of plot manager!
It was much better than the real one, in which you have to dig in and which complicates the procedure for constructing graphs.

  0 Comments

Sign in to comment.


Answer by paul harder on 12 Dec 2018

absurd! please focus on adding functionality instead of taking it away.

  1 Comments

At the very least, could Mathworks implement a straightforward, convenient option to put the buttons back on the figure toolbar? Such as a toggle in the figure 'tools' tab that will remain that way every time Matlab is invoked, until told differently?
Right now, even if the new design is supposedly better by some peoples' lights, in practice it's bad. You have to move the cursor to where the buttons are not (i.e. inside the plot) until Matlab notices, decides to put down the beer and potato chips and gets on with making the buttons visible. Move the cursor out of the plot (still within the overall figure window) to do something else and the buttons disappear, EVEN if zoom is active. So if the cursor is outside of the plot, information on the zoom state is purposely denied. Which is counterproductive and makes no sense.

Sign in to comment.


Answer by John Wood on 14 Dec 2018

Your "accepted answer" is UNACCEPTABLE to users of MATLAB, namely engineers and scientists.
Put these functions back in the figure toolbar.
What you (Mathworks) are doing with this change is absolutely stupid, irrelevant, infuriating, frustrating, and wastes my time on additional mouse clicks and coding that I should not need to do.
I hope you will pay for my extra time spent in using your product, and costs of any carpal tunnel surgery that this wholly unnecessary change has wrought.

  0 Comments

Sign in to comment.


Answer by Christian Borss on 5 Jan 2019

As a senior scientist at Fraunhofer, Matlab is by far the tool that I use most on a every day basis and I now even purchased it for private use at home. I first thought that the missing figure zoom buttons was a bug, but when I found this discussion, I realized that it is a "new feature". I really cannot understand why anybody would want to remove the most important buttons from the figure windows. This is just ridiculous!
To make that very clear: I still consider this change a major bug. Please revert it!

  0 Comments

Sign in to comment.


Answer by Royi Avital on 23 Dec 2018

I like this change.
Remove the clutter.
I guess it is also a step in the direction of having HTML based Figures.

  1 Comments

Then you most likely must be a computer scientist / programmer, and thinking like most web / internet programmer.
Many of the comments explained quite well: for most hard scientists, data exploration is quite important, constantly waiting for button apprearing is more than a pain.
Most importantly, please note that SCIENTIFIC WORK IS NOT WEB/INTERNET WORK.

Sign in to comment.


Answer by David Barry on 24 Dec 2018

In the interest of balance, I just wanted to say that I like this change. It makes perfect sense to me for axes controls to live with/by the axes. I think the hover functionality is good for exploration and removes unnecessary clutter.
"Intelligence is the ability to adapt to change"

  5 Comments

I bet the change was made to be like how Microsoft does things. Like if you're in Word and you double-click some text, a little faded/transparent toolbox comes into view so that you can do things near where your cursor is rather than go up to the main toolbox. That's my guess.
One more annoyance with that though is that if you type PrintScreen, like if you want to upload a screenshot here in Answers, the little temporary toolbar will show in the screenshot - not what we want obviously.
Regarding the point raised above of the unnecessary delays in waiting for the axes toolbar to appear: apparently the axes toolbar has a hidden private property called FadeGroup that presumably controls the fade-in/out effect. This can be accessed as follows:
hFadeGroup = struct(hAxes.Toolbar).FadeGroup % hAxes is the axes handle
I have not [yet] discovered if and how this object can be customized to remove the fade animation or control its duration, but perhaps some smart hack would discover and post the workaround here (or let me know in a private message that I would publish anonymously).
Hey intelligent guy!
I would like to add an important word to your beautiful sentence
"Intelligence is the ability to adapt to sensible change"
and here is a quote for you
"acquiescence is the ability to accept nonsensible change"

Sign in to comment.


Answer by Pablo Sala on 29 Jan 2019

This is precisely the reason why I am always hesitant to install a newer release of MATLAB. And as usual, I always regret having done it, afterwards... Clearly, I have not learnt my lesson, yet....
After installing release 2018b, I wasted several minutes trying to figure it out how to get my figure window to show the tool icons, like they appear in the previous version. I then gave up and did an online search finding these complaints...
Mathworks, stop hindering our performance and bring back this functionality as it was in Release 2018a!!!

  0 Comments

Sign in to comment.


Answer by Bryan Lougheed on 6 Feb 2019

I regularly plot data using multiple axes and/or subplots in the figure window and I can no longer browse the X and Y values of my plotted data, even with the feature turned backed on using the command you have suggested.
I will have to downgrade to 2018a.
This is ridiculous!

  1 Comments

Ok, I now found out how to hover over a subplot and get the datatips icon to appear. It takes about four or five seconds. Then I click on the datatips icon and nothing happens.
This new feature doesn't seem to be able to cope with the complex plots I am throwing at it. Sure, a basic scatter plot, not problem. But not the figure windows I have with multiple axes and thousands of data points. It was never a problem in 2017b. In 2018b, I have yet to make it work for a single data point.
I wish Matlab would concentrate more on performance and less on eye candy.
One of Matlab's main advantages over Python is the relative lack of poorly implemented upgrades. That particular advantage is slowly being eroded.

Sign in to comment.


Answer by Jeff Tackett on 16 Apr 2019

I also vote that this feature is either:
  1. Reverted completed back to the previous tried and true functionality
  2. Add a simple MATLAB preferences checkbox for "old vs. new" figure zooming
  3. Delfault figures to using the old way and users have to manually enable this new way for zooming.
Honestly my productivity using plots has easily dropped by 50% or more. There are often times when I do a quick plot as I'm poking around and investigating the data. So my workflow is plot, zoom, plot something else, zoom, cursors, Aha I see the issue now! But now I have to plot... move cursor on top of figure contents... and wait a long time... select zoom... then it disppears so I'm really not sure if I clicked the right thing... wait again to see what option I really clicked on... and then finally zoom.
So what used to take 2 steps and done in several seconds is now on average 8 steps and about 20 seconds of effort.

  0 Comments

Sign in to comment.


Answer by Bruno Luong
on 4 Dec 2018

A starts to hate the new feature. I never know how to catch the zoom/pan tools it and what is was doing.
I think I'lll disable it by default.

  3 Comments

How do you do it properly. With solution provided here there seems to be some shortcomings.
What is shortcoming?
I put this lines in my startup.m
try %#ok
if ~verLessThan('matlab','9.5')
set(groot,'defaultFigureCreateFcn',@(fig,~)addToolbarExplorationButtons(fig));
set(groot,'defaultAxesCreateFcn',@(ax,~)set(ax.Toolbar,'Visible','off'));
end
end
The code in "startup.m" does not work always. You'll still have problem when using subplot. And the hidden axistoolbar exists always, can mess up the axis handles when you use axis handle. Technically, this function is not mature enough to be put in released version.

Sign in to comment.


Answer by Brian G
on 7 Feb 2019
Edited by Brian G
on 7 Feb 2019

If this was really meant to make per axes things easier, then why didn't the link, colorbar, and legend buttons move as well?
The most frustrating thing for me is having to hover over the axes to get the icons to show up, and then waiting for them to fade in.
I see why they fade in, it is so they don't interfere with the title. However, I think your solution to a very small problem has created much bigger problems. PLEASE change it back.
If you really want to improve things, get rid of the +/- zoom buttons, and just have a zoom mode button. Make it enabled by default. clicking and dragging will do the rectangle select zoom. mouse wheel zooms in and out like it already does. maybe, right click to drag and pan or rotate? currently right click seems to do nothing. double click to return to default view. maybe double right click to activate a data tip?
Come to think of it, you could actually eliminate ALL of the tool strip. I would't have to click a single button anywhere.
P.S. thanks for those posting solutions to return things to the old way.

  0 Comments

Sign in to comment.


Answer by Flavv
on 22 Feb 2019
Edited by Flavv
on 22 Feb 2019

I also agree. These buttons were so useful. Now they are hidden and require more effort to do the same as before. To me it seems, especially for software, that they evolve to a point of near perfection and then, instead of keeping this state, there is a reverse evolution driven by the "need to change": Mathwork, as with all software companies, always needs to produce some new version, even though it is already very mature. So what can they change for the new version? Useful tools into more beautiful, less useful ones.
Flavien

  1 Comments

Exactly: they are creating change in order to change.
Unfortunately, they always have nice pretext to justify these changes, just like people from Mathworks had commented in another blog: the objectif of these changes is to improve the work-flow. This is unfortunately again something that they imagine from the office, not from the real world field.
Their intention might be interesting, but putting somethin like this (quite buggy and without any robust solutions) is not acceptable.

Sign in to comment.


Answer by Xiang Chen on 27 Feb 2019

Pls undo the, it's the most stupid update I've ever seen.

  0 Comments

Sign in to comment.


Answer by John Wood on 14 Dec 2018

OK, Back to R2017b for me.
Which probably means I don't have to pay for maintenance...
great marketing!

  1 Comments

Why not changing your startup file as indicated above, then you are set with those disatrous feature.

Sign in to comment.


Answer by Yair Altman on 10 Jan 2019
Edited by Yair Altman on 10 Jan 2019

For the benefit of readers who don't follow my blog, Michelle Hirsch posted the following comment yesterday, which sheds some light on the subject:
Rest assured the team is digging in to the feedback to figure out the best approach to addressing concerns.
One thing puzzles me about the whole conversation (esp. on MTLAB Answers). Nobody is mentioning the default axes interactions, which we introduced along with the axes toolbar. We actually felt this was the biggest breakthrough, because you don’t need to interact with the toolbar at all in order to zoom, pan, rotate, or add datatips to a chart. Any thoughts on this? There’s a huge banner on the figure in 18b that introduces these new gestures so we thought people would find them.
I also can clarify a couple of things from your post:
* The Toolstrip was not driven by the marketing guys (and gals!). It was very much driven by our interest in improving discoverability of key capabilities which were too buried in menus and toolbars.
* The axes toolbar was not created primarily to support the move to web graphics. We intended it to be a solution to multiple problems:
** The toolbar for a figure docked in the desktop can be very far from the figure itself.
** We’d like to move towards being able to define interactions at the axes level, instead of the figure level, since interactions are axes specific. The axes toolbar is one step in that direction

  6 Comments

Hello Yair,
Could you explain where the "huge banner on the figure in 18b is?" Is the banner perhaps something that appears the first time that Matlab is invoked after download, and then not again? Maybe no one is talking about the new features because they are effectively hidden.
At any rate, documentation by banner is not what most people would call good software practice.
And in this case the regular documentation of the phantom toolbar does not work either, for a different reason: it's inaccurate. If you go to "Interactively Explore Plotted Data" it says: "Some types of interactions are enabled by default, while other types of interactions are only available through the axes toolbar. The toolbar appears at the top-right corner of the axes when you hover over it."
This is not true. It only appears when you hover the cursor over the actual plot. Then, as i mentioned in a separate comment, if you take the cursor off the plot (still in the figure window but not on the toolbar) the toolbar disappears again, intentionally taking away any visual knowledge of whether any of the toolbar zoom states are active or not. That's poor.
I am yet to upgrade to 2018b but for my UI I'm hoping this will be a huge benefit. I have a complicated UI with multiple axis and controls. I wasted a lot of time trying to find work arounds to have different controls working on different images such as zoom. I'm hoping this change fixes this.
I feel that the change to controls being on the axis instead of the figure is long over due, not sure why there is such a big backlash.
Even in my complex GUI, with subplots, I don't want axis-specific controls. Just one button Zoom+ and I can zoom into all measurement channels. If I had to switch it on several times, this would be very annoying.
If someone wants axis-specific controls, make it an option to switch it on. But leave the old behaviour, because it is the most reasonable. Almost nobody likes the new one. Just leave it like it was before as default.
The fading-effekt is also very annoying. If somebody likes it, why not make it optional?

Sign in to comment.


Answer by Bruno Luong
on 10 Jan 2019

"We’d like to move towards being able to define interactions at the axes level, instead of the figure level, since interactions are axes specific. The axes toolbar is one step in that direction"
The interaction can be at axes level dependings on coordinates of the mouse when the action is triggereg (or even hovering coordinates), no?
What I don't like is the fact that they are hidden and I don't see instanttaneously where to move the mouse to see them. We’d like to move towards being able to define interactions at the axes level, instead of the figure level, since interactions are axes specific. The axes toolbar is one step in that direction
For people who don't use daily MATLAB and for whom I deploy appplications, it's even more difficult to explain. I have many bad critics from end users since this new feature is incorporated and I needed to reverse all them back.

  3 Comments

I believe that Michelle was referring to the [excellent] new feature that zoom, pan, rotate and data-tips are automatically enabled when the axes appears, using intuitive mouse actions. Just use the mouse wheel to zoom/in out, or drag the axes to pan/rotate, or move the mouse around the plot to see data-tips (and click once to pin them). It's actually very intuitive, and removes much of the need for the corresponding controls in a toolbar.
The only need for the zoom/pan/rotate/tips controls now is to disable all the other mechanisms except for the one that is selected. For example, if you click the zoom control, then you can zoom but you will not get distracted by panning/rotation/data-tips. Again, this is pretty intuitive and once I got used to it I rarely use the toolbar...
I suspect the default interactions are burried under the feedback about the toolbar change. It is indeed much more useful to have the default interactions, especially in the data exploration phase.
The axes interactions are pretty good though I find that they are a bit slow when data tips are turned on.
One issue I have is that I can't find an easy way to perform the action of double-clicking as in the case of the ordinary pan or zoom tools. I use the double-click quite a bit when exploring data or simulation results by zooming into one spot then double-clicking to snap back to the full range.

Sign in to comment.


Answer by Jack
on 9 Mar 2019

Everyone in my lab is annoyed at this change. Please make it easy to undo it by default.

  3 Comments

This is not an answer to the question.
Also, the proposed solution is not too difficult to apply. Are you having any issues with this method of editing startup.m?
It may be that the folks at the Mathworks are overdue for serious soul searching. The future of Matlab is not by any means guaranteed, but -- according to my estimates -- it's best hope for enduring will come from carefully sustaining the advantages that it has and avoiding a slide towards adopting "me-too" implementations.
I count myself as a scientist/engineer with a record of many years of intensive reliance on Matlab. For me, crucial features of a system like Matlab are predictability and accessibility. I often have vigorous discussions with co-workers who prefer Python over Matlab, and I explain to them that the crux issue is not what a programming environment allows me to accomplish, but instead the key is how accessible are the capabilities that are offered.
On the topic of graphics interactions, I may be a heavy user of Matlab, but during the course of my workweek I also rely on many other software tools (for CAD, FEM, etc.), and as I move from one tool to the next the last thing I want is some kind of guessing game about how this particular tool wants me to interact. I want to see the needed capabilities and activate them quickly. I have always relied on Matlab for its superior interactive graphing. The recent change in 18b is a serious degradation.
Consider this thought experiment: if huge banners are a suitable way for introducing new features, and writing and maintaining startup scripts is easy and trouble-free, why not use the banner to tell the users that there is a new feature available to them and all they have to do is write a couple of lines in a startup script in order to enable it? The rest of us can just get on with our lives.
Whenever I install a new version of Matlab it is not because I have time on my hands; I am usually in the middle of trying to get some work done, and I don't intend to spend a lazy afternoon browsing through the release notes.
On the specific topic of "mouse hovering," I can say that for my purposes I have never found it to be anything but an obstacle and a nuisance. When it showed up in the Matlab graphics, It took me considerable time to figure out how to overcome it.
I agree, Bob.
Incidentally in the Machine Learning and Data Science areas, based on what I have seen, Matlab has lost the battle to various environments written around Python already.
I also jump around between Matlab and other tools like CAD and optics modeling and design software.

Sign in to comment.


Answer by Robert Aho on 23 Apr 2019

Just chiming in that this is a BUG not a feature. Poorly thought out, badly implemented, and completely user hostile. A real PITA that is unwelcome and exceptionally annoying.

  0 Comments

Sign in to comment.


Answer by Zining Wang on 26 Apr 2019

Annoying change. At least we should be able to set the toolbar as default by changing the preference.

  0 Comments

Sign in to comment.


Answer by sbnwl
on 29 Apr 2019
Edited by sbnwl
on 29 Apr 2019

The change is not welcome.. Totally loses the functionality.

  0 Comments

Sign in to comment.


Answer by abraham
on 30 Apr 2019

who made this? come out to apologize...

  0 Comments

Sign in to comment.


Answer by Michael Montouchet on 25 Jun 2019

I am using a scatter3. It used to be very easy to rotate the things I display, now I have to use this command before being able to use the camera rotation:
addToolbarExplorationButtons(gcf)
It used to be simple.
Why is Matlab deleting nice features?
The reasons why Matlab is better than Python are the UI, the support, good documentation, user-friendlyness. Please continue this way and stop deleting what makes it easy. Otherwise, I would not see the point of using Matlab instead of Python.

  0 Comments

Sign in to comment.


Answer by Bryan
on 3 Jul 2019

Have five subplots right next to each other.
Hovering my mouse over the third subplot desperately trying to get the datatips icon to appear. Sometimes it does. Other times it doesn't.
Please get rid of this trash.

  1 Comments

I think this is the right argument: the change is not properly designed and causes frustration.
It is not like the changes in the past years like default plot colors or automatic set new color to curves. These are the kind of "quality of life" changes and people don't want to dig into the startup.m file to roll it back.
The missing toolbar is frustrating and the new replacement for it is not straightforward and buggy.

Sign in to comment.


Answer by wea555
on 14 May 2019

The Zoom+ button is the one I use most often in plot windows. Why removing this one? Does it make fun to annoy users?
It's the same as with Microsoft, Gnome, Mozilla etc., they just remove very commonly used features, without replacement, without option to configure it back, sometimes even without notice or reason. Menu bars disappear, symbol bars disapear, frame borders shrink to zero size (very confusing for overlapping windows), status bars disapear .... Why not delete the software completely?
I understand the motivation to give individual controls to subplots. But please leave the common symbol bar intact, at least as an option (View settings -> Zoom toolbar).
Matlab is used for experimenting in research and development. Ad-hoc and interactive work, with some plots in between, mostly single plots, not subplots or GUI. The option to create some GUI apps is nice, but it's not the main application area for MATLAB.
The "accepted answer" is a quick-and-dirty workaround about the problem. It still does not remove the annoying fading effect in subplot-figures.
Don't forget, people take MATLAB because it's user-friendly to open a measurement and zoom into the timeline. If this is not comfortable, there are also other alternatives, like Octave and SciPy ...

  0 Comments

Sign in to comment.


Answer by Amir Moghadam on 25 Jun 2019

It has been almost a year since I installed 2018b, and in less than 20 minutes from the installation, I uninstalled it and went back to 2018a because it was a stupid change. I was trying to inspect the corner of the picture and the annoying hidden rediculous buttons obstruct the point where I am trying to put a data tip on.
Anyway,
Can we get a notification when and if you guys decide to put the old fully functional buttons back on the toolbar in 2020 or 2021 and give me the option to get rid of the hidden buttonsso that I don't have to waste time installing and uninstalling the new versions just to find out if the old buttons are back. If not, 2018 a would be the latest version of matlab that I will ever install on any computer.

  2 Comments

You can easily revert the changes with some tweaks to your startup.m file. What is your actual problem? You can put the buttons back if you prefer, so at least that is not a reason for skipping the newer releases.
I get that you are annoyed your workflow is not working out of the box like you prefer, but these changes are fully revertable, unlike some other changes in the past. I still use the set syntax instead of dot notation in most cases.

Sign in to comment.


Answer by Scott Nuccio on 26 Jun 2019
Edited by Scott Nuccio on 26 Jun 2019

Here is the best I have come up with. Thought I would share.
In my startup.m file I have the following line. They overwrite the new figure functions such that everytime you create a figure, the axes toolbar is removed and my script for adding the appropriate buttons to the figures toolbar is called.
try %#ok
if ~verLessThan('matlab','9.5')
set(groot,'defaultFigureCreateFcn',@(fig,~)figToolbarFix(fig));
set(groot,'defaultAxesCreateFcn',@(ax,~)set(ax.Toolbar,'Visible','off'));
end
end
My script for adding buttons to the toolbar is called 'figToolbarFix.m' and lives in my 'user -> documents -> matlab' folder with my 'startup.m' file.
function [] = figToolbarFix(hFig)
%UNTITLED2 Summary of this function goes here
% Customize the default figure toolbar
% hFig = handle of figure to be customized
%
% Example: figToolbarFix(gcf);
% Example: hFig=figure; figToolbarFix(hFig);
% enable the old 'zoom', 'rotation', 'pan', 'data tips', etc., buttons
addToolbarExplorationButtons(hFig)
% load a pretty images to use for our buttons. Check MATLAB\release\toolbox\matlab\icons for other options, or
% make your own. Note the double conversion (rgb -> ind -> rgb) to normalize a png image.
[img1,map1] = rgb2ind(imread(fullfile(matlabroot,...
'toolbox','matlab','icons','tool_plottools_show.png')),32);
[img2,map2] = imread(fullfile(matlabroot,...
'toolbox','matlab','icons','pageicon.gif'));
% Convert image from indexed to truecolor (want true color RGB with values of 0 to 1)
icon1 = ind2rgb(img1,map1);
icon2 = ind2rgb(img2,map2);
% Get hiddenhandle of the toolbar we want to append to. By default the 'Figure Toolbar' is the only one active
% and should be listed last assuming a new, blank figure. Use 'figure; allchild(gcf)' to show all children
hToolbar=findall(gcf, 'type', 'uitoolbar'); %hToolbar=allchild(hFig); hToolbar=hToolbar(end);
%% for Seperate property editor and plot browser buttons
% % Add a new uipushtool to the end of the toolbar.
% uipushtool(hToolbar,'CData',icon1,...
% 'TooltipString','Property Editor',...
% 'ClickedCallback','propertyeditor',...
% 'Separator','on',...
% 'HandleVisibility','off');
%
% % Add a new uipushtool to the end of the toolbar.
% uipushtool(hToolbar,'CData',icon2,...
% 'TooltipString','Plot Browser',...
% 'ClickedCallback','plotbrowser',...
% 'Separator','off',...
% 'HandleVisibility','off');
%% for a single toggle that opens/closes the previous state of the plot tools (use view menu to show/hide plot/browser/editor)
uitoggletool(hToolbar,'CData',icon1,...
'TooltipString','Property Editor',...
'OnCallBack','plottools(''on'')',...
'OffCallBack','plottools(''off'')',...
'Separator','on',...
'HandleVisibility','off');
end
Take and go forth!!
Also see for more info and customizations:
Good Luck

  1 Comments

You could also consider these edits:
%in startup.m:
try %#ok
if ~verLessThan('matlab','9.5')
defaultFigureCreateFcn=@(fig,~)addToolbarExplorationButtons(fig);
% Using evalc ensures that you can group functions in a single
% anonymous function that otherwise have no output (as neither
% disableDefaultInteractivity() nor set() have output arguments).
defaultAxesCreateFcn=@(ax,~){...
evalc('set(ax.Toolbar,''Visible'',''off'')'),...
evalc('disableDefaultInteractivity(ax)')};
set(groot,'defaultFigureCreateFcn', ...
defaultFigureCreateFcn);
set(groot,'defaultAxesCreateFcn', ...
defaultAxesCreateFcn);
end
end
And/or:
%for use in functions you might need to share with others:
function fig=figure_legacy(varargin)
fig=figure(varargin{:});
try %#ok if verLessThan is missing verLessThan would have returned true
if ~verLessThan('matlab','9.5')
addToolbarExplorationButtons(fig)
% Use eval to trick the syntax checking in ML6.5 (both the ~ and
% the @ trip up the syntax checker).
%
% Using evalc ensures that you can group functions in a single
% anonymous function that otherwise have no output (as neither
% disableDefaultInteractivity() nor set() have output arguments).
defaultAxesCreateFcn=eval(['@(ax,~){',...
'evalc(''set(ax.Toolbar,''''Visible'''',''''off'''')''),',...
'evalc(''disableDefaultInteractivity(ax)'')}']);
set(fig,'defaultAxesCreateFcn', ...
defaultAxesCreateFcn);
end
end
end

Sign in to comment.


Answer by Tomoya Takeuchi on 4 Jan 2019

I put this lines in my startup.m
set(groot,'defaultFigureCreateFcn','addToolbarExplorationButtons(gcf)')
set(groot,'defaultAxesCreateFcn','set(get(gca,''Toolbar''),''Visible'',''off'')')

  2 Comments

Thank you Tomoya! This works great.
I like this disastrous feature: one click compared with hunting around the menus for a disastrous feature I use all the time to inspect my results. It's quick and easy and does the same thing every time.
the init code using GCF is buggy; scroll up to get unbuggy code

Sign in to comment.


Answer by Bruno Luong
on 14 May 2019

The "accepted answer" is a quick-and-dirty workaround about the problem. It still does not remove the annoying fading effect in subplot-figures.
The fix works fine for me, meaning there exists no subplot icons, and the global zoom/pan are on the toolbar.

  6 Comments

Hi Rik,
I think the point is that Mathworks added a feature that is annoying to many customers and does not serve them well. On the contrary it interferes with their customers' productivity.
Adding a bunch of code to the startup.m file is a kluged solution. The best solution would be to add the feature as a graphics option that customers can turn on and off in preferences, not enable the feature by default, and then provide better direct education to their customers regarding the feature.
You and me both turn it off, but in a thread like this you will only find people who are annoyed about the change. I have no clue about how the division is among Mathworks customers between the group of people who prefer the new way, and those who prefer the old way.
I also don't really agree with your point of it being a kludged solution. The startup.m is the perfect spot to put code that you want to affect every session of Matlab. I think I would even support a decision of making the preferences window a GUI wrapper for startup.m, although that is never going to happen.
And regarding educating the customer: I often learn new functions and tricks on this forum. I recently learned about a function that has been around for at least a decade or two (the tempname function, if you're interested). There are so many things you can do with Matlab, many of which seem really basic aften using them for a while. I don't think leaving the old setup as a default and having the new one as an option would work, while this way the people preferring the old way will find a method to revert the behavior.
Can you also revert all the axes callbacks that are executed even after disabling toolbar? When I use the "fixes" listed in this thread I still end up with a bunch of ToolbarController callbacks i.e.
ToolbarController.handleMouseMotion
ToolbarController.getHitAxes
ToolbarController.isPlotEditMode
I have a GUI with a measurement tool (where toolbar on all axes is set to []) and the primary slowdown is all these ToolbarController callbacks.
  • Peter

Sign in to comment.


Answer by Rajmohan
on 17 Jul 2019

Hey everyone,
Is there an equivalent fix for Simulink plots?

  0 Comments

Sign in to comment.


Answer by Joe Wishon on 19 Jul 2019

Please please please change this back. This makes me significantly less productive to quickly analyze data. I really hate this and it makes me much less efficient in analysis. Please just give us an option to return in by default. PLEASE!

  3 Comments

You can either edit startup.m or use a function like I describe in a comment above. You don't need to keep using the new style if it doesn't suit your needs. You have an option to revert this change. Have you tried either?
Can you also revert all the axes callbacks that are executed even after disabling toolbar? When I use the "fixes" listed in this thread I still end up with a bunch of ToolbarController callbacks i.e.
ToolbarController.handleMouseMotion
ToolbarController.getHitAxes
ToolbarController.isPlotEditMode
I have a GUI with a measurement tool (where toolbar on all axes is set to []) and the primary slowdown is all these ToolbarController callbacks.
  • Peter
Have you run the profiler on a previous version as well to compare these? I can imagine this is your slowdown, but these functions look like they should be the generic handlers, also if you would define your own callback functions for a hover state. They also exit in about 1ms, so they aren't that slow either. I would assume most callbacks for mouse movement would take a similar amount of time (or more).

Sign in to comment.



Translated by