How Can I White Space From Both Axis in Surface Plot?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ted Baker
am 21 Okt. 2019
Kommentiert: Star Strider
am 21 Okt. 2019
Hi I'm trying to remove the whitespace around some surface plots I have made:
![50start.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/243819/50start.png)
I have tried using linspace in both dimensions, but can only remove the white space on the x axis (appears as y axis on the image above as I've rotated the plot). My code is as follows:
amp_limits = linspace(first_amp, last_amp, num_amp);
term_limits = linspace(first_term, last_term, num_terms);
BER_mat = reshape(BER_single, num_terms, num_amp);
amp_mat = first_amp:amp_res:(last_amp-amp_res);
term_mat = first_term:2:last_term;
[amp_mat, term_mat] = meshgrid(amp_limits, term_limits);
%surface in 3D
figure;
surf(amp_mat, term_mat, BER_mat);
view(90,-90);
xlabel('Amp');
ylabel('term');
This removes the white space along the top of the image, but not on the sides. Why is this?
Thanks in advance.
Akzeptierte Antwort
Star Strider
am 21 Okt. 2019
2 Kommentare
Star Strider
am 21 Okt. 2019
As always, my pleasure!
I appreciate your posting your working code. It will help others who read this.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!