Plotting issues with dash-dot and dotted lines: How to modify default linestyles for better use with vector renderer 'painters'?

北城以北 提交于 2019-12-03 16:25:27

MATLAB's plotting routines used to be top-notch. They were so much better than those of the competition that they were a reason to buy MATLAB for many people.

This has changed however. They seem rather like a blast from the past now, when compared to plots from Mathematica, SciLab, and others. They don't look very pretty, they have lots of issues with different-then-standard rendering engines, customizability is rather poor, even simple changes can be quite complicated to effect, etc.

Don't get me wrong, they're still pretty good, but they are no longer a reason to buy the product anymore. I've even heard some potential new users deciding for one of its competitors, in part based on how graphics look.

MathWorks is of course more than aware of this. They are rather slow to respond (I assume they have some difficulties), but I know they have been working on a major overhaul of the graphics algorithms and utilities for over 4 years now.

It's called called hg2, short for handle graphics v. 2. It's already been available in MATLAB since 2010, but then it was completely undocumented, buggy, hard to use, etc.

This has however improved steadily over the years, and now it's actually quite usable (although still unsupported, officially). Yair Altman (from UndocumentedMatlab.com) wrote a nice in-depth article on the subject.

This has the functionality you need, and then some :)

EDIT: I just got an e-mail from John Kelly, the current administrator from MATLAB central. The first few lines:

The R2014b prerelease is now available for download. This version of MATLAB contains many new features including a new graphics system. There are changes in the R2014b graphics system that may affect the operation of existing code. As an author of a popular File Exchange submission, we would like to encourage you to download the R2014b prerelease so that you have an opportunity to make changes to your submission in preparation for the release of R2014b.

So R2014b finally ships with an official hg2 :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!