Questions tagged [matlab-hg2]

Handle Graphics 2nd generation. Enables Matlab programmers to customize graphic objects appearance to suit their needs in a more intuitive manner than possible using HG1.

Handle Graphics 2nd generation. Enables Matlab programmers to customize graphic objects appearance to suit their needs in a more intuitive manner than possible using HG1.

33 questions
19
votes
1 answer

Redraw a figure saved in 2013b in 2014b

As MATLAB has changed its figure engine in R2014b I decided to rerun some of my code for getting better looking figures out of them. Unfortunately, the last one I have is a code that takes ages to run, and I would like to highly avoid to rerun the…
Ander Biguri
  • 32,737
  • 10
  • 68
  • 106
10
votes
1 answer

How do I access the new value of an PropertyEvent in MATLAB R2014b?

Background In previous versions of MATLAB (e.g. R2013b), I had a neat trick where I would attach a listener to an axes handle's YLim property, which would notify me when the axes y-limits were changed: addlistener(gca, 'YLim', 'PreSet',…
KQS
  • 1,455
  • 10
  • 18
8
votes
3 answers

MATLAB: edges of patches visible after export as vector graphics

Patches in Matlab are glued together from individual triangles. Their edges are normally not visible, but when I export the figure in a vector graphics format they can clearly be seen (not the whole picture is shown, just a zoomed-in portion) Code…
6
votes
3 answers

Triangular split patches with painters renderer in MATLAB 2014b and above

MATLABs new graphics engine, HG2, fails to properly print patches using the painters renderer: hist(randn(1,1000)); colorbar('Location','SouthOutside'); print('test.pdf','-dpdf'); The resulting patches, whether generated by hist or colorbar, have…
ktolbol
  • 116
  • 3
6
votes
2 answers

Drawing the top axis (box) line

I have a plot with two lines and two different x-axis (different data units), which I plot like the following. My problem is that I would like to draw the top line of the box black as well (horizontally), and not leave it "open" like it is. It would…
Ela782
  • 4,543
  • 5
  • 46
  • 61
5
votes
1 answer

Getting reliable renders on Matlab R2014b+ (HG2)

I can't manage to make Matlab new graphics engine (HG2) display lines and markers in a reliable way, meaning a way that is identically displayed / rendered everywhere in the axes / screen. To demonstrate the issue, I've coded a simple script (see…
5
votes
1 answer

How to increase marker size of the legend in scatter plot in MATLAB 2014b?

I found marker size in the scatter plot and the legend is different in MATLAB 2014b. I searched & found some solution from earlier version of MATLAB, which are not applicable in the latest version. In my current version, the marker size in legend is…
user962808
  • 115
  • 1
  • 1
  • 9
5
votes
1 answer

MATLAB R2014b: Rendering plots with lines in the same place

Since version R2014b, MATLAB now renders graphics nicely anti-aliased (finally!) However, this causes a glitch in the way it displays some of my figures. If I plot a line, use hold on and then plot another line in exactly the same place with a…
CaptainProg
  • 5,188
  • 22
  • 67
  • 109
4
votes
1 answer

Showing a new image inside existing axes w/o deleting the colorbar

I am working on a GUI that is being initialized by creating several axes along with an invisible colorbar for each one (this is done so that axes maintain their predefined Position)1. The handles to all axes and colorbars are stored. Interactions…
Dev-iL
  • 22,722
  • 7
  • 53
  • 89
4
votes
1 answer

Size of color bar including labels in Matlab R2014b

How do I find out how much space a color bar takes up using Matlab R2014b? I need to know the total size including all labels, but if I do c = colorbar; get(c,'TightInset'); I get the error message Error using…
user1919235
  • 382
  • 6
  • 15
4
votes
2 answers

Exporting figures as vector graphics in .pdf-format using HG2-Update and 'painters' renderer is not working properly

I'm using the still undocumented HG2-Update to create my MATLAB plots, because they just look that much nicer. (Source: Yair Altman) Actually, using the current version Release 2013b it works quite nicely and there are not much issues. Except one…
thewaywewalk
  • 24,484
  • 9
  • 62
  • 109
3
votes
1 answer

Nicer errorbars when multiple data is shown

So I need to plot some errobar plots in a figure. Specifically I need 4 errorbar plots in each figure, the problem is that the figure gets a bit unreadable when several data is plotted. Example: clear all close all clc x = 0:pi/10:pi; y =…
Ander Biguri
  • 32,737
  • 10
  • 68
  • 106
3
votes
0 answers

Issues with the stem function of MATLAB

I've installed the last version of MATLAB R2014b, I have a problem with the stem function not showing the line to the Data points , for example: stem(1:12); looks like I've try to adjust the Linestyle as shown in documentation . figure X =…
Engine
  • 4,930
  • 14
  • 65
  • 140
3
votes
2 answers

Jagged outline using Matlab 2014b

I am plotting some maps using Matlab that use mapshow to plot the country border from a shapefile. I then export them to both a PDF and EPS format using the export_fig package. This worked completely fine using Matlab 2014a, but I have just upgraded…
emmalgale
  • 279
  • 3
  • 13
2
votes
1 answer

Manipulating underlying image data of colorbar in Matlab

In matlab versions prior to 2014 I could alter the underlying image in the colorbar by doing the following: cmap = ... % something which is MxNx3 colormap(reshape(cmap, [N*M,3])) cmapIxs2D = reshape((1:(N*M))', [N, M]); ax = colorbar('peer',…
thorsan
  • 994
  • 7
  • 19
1
2 3