matlab-hg2

Jagged outline using Matlab 2014b

与世无争的帅哥 提交于 2019-12-18 08:55:59
问题 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 to Matlab 2014b to take advantage of something else that has improved, and now my country border is all jagged. The border only looks jagged on the saved versions of the file. If I zoom in on the figure window, the outline isn't like that. Here

Rendering with painters and HG2 leads to black background of plot after printing

折月煮酒 提交于 2019-12-13 06:54:59
问题 If I print a figure in MATLAB the background of the plot gets rendered black instead of white, like this: (But in the figure window of MATLAB it is white as it is supposed to be) This is the code similar to the one used to print the figure(but will run copy-paste): figure; set(0,'DefaultAxesFontSize',13) set(0,'DefaultTextFontSize',13) set(gcf, 'Renderer', 'painters'); y = 1:100; plot(y) xlabel('Some X', 'FontSize', 14) ylabel('Some Y', 'FontSize', 14) title('Example', 'FontSize', 15) legend(

Size of color bar including labels in Matlab R2014b [duplicate]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 07:53:27
问题 This question already has answers here : Obtain full size of colorbar in Matlab (2 answers) Closed 2 years ago . 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 matlab.graphics.illustration.ColorBar/get There is no TightInset property on the ColorBar class. The same holds for OuterPosition. Apparently, these properties are no longer

Size of color bar including labels in Matlab R2014b [duplicate]

爷,独闯天下 提交于 2019-12-05 13:45:41
This question already has answers here : Obtain full size of colorbar in Matlab (2 answers) Closed 2 years ago . 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 matlab.graphics.illustration.ColorBar/get There is no TightInset property on the ColorBar class. The same holds for OuterPosition. Apparently, these properties are no longer supported for the ColorBar class in R2014b. Try: original = get(c, 'Position') set(c, 'Position',

Change legend line style

不问归期 提交于 2019-12-04 02:15:22
问题 I am playing with the visual effect of plots, and a question came up while changing the style of a legend . To be able to save the figure with legends big enough that can be seen usually one needs to change the FontSize property to e.g. 24. When you do that, the size of the font changes, however, the small line next to it has the same size than when it was small. The proportion between line/text seem quite appropriate to me with a FontSize of around 10, while I believe that with big font

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

无人久伴 提交于 2019-12-03 13:34:13
问题 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 triangular splits: The issue has been discussed on MATLAB Central here and here, where it was suggested that disabling the "smooth line art" option in the pdf-viewer should solve it. This conceals the problem in some readers (e.g. in Adobe Reader

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

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 03:29:45
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 triangular splits: The issue has been discussed on MATLAB Central here and here , where it was suggested that disabling the "smooth line art" option in the pdf-viewer should solve it. This conceals the problem in some readers (e.g. in Adobe Reader but not in Apple Preview), but it is hardly a solution to ask collaborators and readers to use a

How to properly display TeX strings in axes' datatips? (MATLAB hg2)

孤者浪人 提交于 2019-12-02 04:28:58
问题 I have recently tried to run an old piece of code (written on hg1) on a new version of MATLAB (2015a) that has hg2. I used to be able to do the following (according to the "gnovice-Amro" method): function output_txt = customDatatip(~,event_obj) % Display the position of the data cursor % obj Currently not used (empty) % event_obj Handle to event object % output_txt Data cursor text string (string or cell array of strings). hFig = ancestor(event_obj.Target,'figure'); %// I don't trust gcf ;)

How to properly display TeX strings in axes' datatips? (MATLAB hg2)

谁都会走 提交于 2019-12-02 02:38:49
I have recently tried to run an old piece of code (written on hg1) on a new version of MATLAB (2015a) that has hg2. I used to be able to do the following (according to the " gnovice - Amro " method): function output_txt = customDatatip(~,event_obj) % Display the position of the data cursor % obj Currently not used (empty) % event_obj Handle to event object % output_txt Data cursor text string (string or cell array of strings). hFig = ancestor(event_obj.Target,'figure'); %// I don't trust gcf ;) pos = get(event_obj,'Position'); output_txt = {['\lambda: ',num2str(pos(1)*1000,4) 'nm'],... ['T(

Drawing the top axis (box) line

会有一股神秘感。 提交于 2019-12-01 17:04:55
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 be great if the line had the x-axis ticks as well, same as the bottom horizontal axis line. Obviously, grid on doesn't work, because it draws the y1-axis ticks on the right and the y2-axis ticks on the left, which I don't want. Also, I think in Matlab 2014, this worked: set(ax(2),'XAxisLocation','top','XTickLabel',[]); but it doesn't anymore in