matlab-figure

Change color graphic bar

老子叫甜甜 提交于 2021-02-05 09:28:16
问题 I have two datasets of data printed on the same graph. What I want is to differentiate the information by putting a legend that indicates the color of each of the two pieces of information in the graph. I have not been able to put a different color to each information and also a legend that shows what data each color belongs to. My code: . . . %grafica de barras 1 bar(app.CasosUIAxes,data1.dateRep,data1.cases,'r') %grafica de barras 2 bar(app.CasosUIAxes,data2.dateRep,data2.cases)

How can I plot professional quality graphs in matlab? [closed]

耗尽温柔 提交于 2021-02-04 21:59:28
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . Improve this question The default graphs produced from matlab are very different from what I see in books. For example the image below looks visually pleasing. Can I change default settings of matlab to mimic this graphing style? 回答1: This question will refrain from lecturing

How can I plot professional quality graphs in matlab? [closed]

时光毁灭记忆、已成空白 提交于 2021-02-04 21:58:47
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . Improve this question The default graphs produced from matlab are very different from what I see in books. For example the image below looks visually pleasing. Can I change default settings of matlab to mimic this graphing style? 回答1: This question will refrain from lecturing

How can I plot professional quality graphs in matlab? [closed]

夙愿已清 提交于 2021-02-04 21:58:28
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . Improve this question The default graphs produced from matlab are very different from what I see in books. For example the image below looks visually pleasing. Can I change default settings of matlab to mimic this graphing style? 回答1: This question will refrain from lecturing

How to shade area and make it transparent between two lines in MATLAB?

吃可爱长大的小学妹 提交于 2021-01-28 19:46:45
问题 I shaded the area between two lines, it's not very clean: area(xData,[Y1(:) ,Y2(:)-Y1(:)]); hold on colormap([1 1 1; 0 0 1]); How to make it transparent too in MATLAB? So that it comes like: ref:peltiertech.com 回答1: You can use the FaceAlpha property of the area object to set the transparency level: xData = 1:7; Y1 = [3 2 1 4 3 2 1]; Y2 = [8 6 9 8 7 5 6]; area(xData, Y2, 'EdgeColor',[0 .447 .741], 'FaceColor',[0.929 .694 .125], 'FaceAlpha',.3); hold on area(xData, Y1, 'EdgeColor',[0 .447 .741

Create Matlab figures in LaTeX using matlabfrag or alternatives

廉价感情. 提交于 2021-01-28 19:28:24
问题 I want to include Matlab figures into latex preferably with vectorised formats but with LaTeX MATLAB fonts for all text. I have been using the MATLAB function matlab2tikz which worked perfect for simple figures, but now my figures have too many data points which cause an error. So matlab2tikz is not suitable. I've been looking at matlabfrag which I think will accomplish what I want, but when I run the script in LaTeX as detailed by the user guide it has an error File not found . This is my

Single Colorbar for Vertical Subplots

大憨熊 提交于 2021-01-27 17:30:40
问题 I would like to make the following MATLAB plot have a single colorbar that extends along both subplots. Something like this (done manually with the figure editor): Note: This is different from the question asked here. Thanks! 回答1: I finally figured out a solution. The colorbar can be manually positioned in code but I wanted to keep everything the original spacing. My final solution is outlined below. Step 1. Create the plot with a single colorbar on the bottom subplot. figure('color', 'white'

MATLAB figures don't have the same size when inserted in LaTeX (Although produced using the same code)

徘徊边缘 提交于 2021-01-27 14:11:38
问题 I am producing some figures in MATLAB and try to insert them in LaTeX. However, when I do so, they usually don't have the same size (although I am using the same setup to produce them). For example: The MATLAB code I am currently using is this one lsize = 16; % Label fontsize nsize = 16; % Axis fontsize q=randn(100,1000); a1=linspace(1,1000,1000); b1=linspace(2,2000,1000); figure (1) histogram(q) xlabel('Time [sec]','Fontsize', lsize) ylabel('W_{kin} [keV]','Fontsize', lsize) set(gca,