Anda di halaman 1dari 3

Examples See Also Contoh Lihat Juga

subplot
Create and control multiple axes Membuat dan kontrol beberapa sumbu

Syntax Sintaksis
subplot(m , n , p) subplot (m , n , p)
subplot(h) subplot (h)
subplot('Position',[left bottom width height]) subplot ('Posisi', [kiri
bawah lebar tinggi])
h = subplot(...) h = subplot (...)

Description Deskripsi
subplot divides the current figure into rectangular panes that are numbered row-wise. subplot
membagi angka saat ini ke panel persegi panjang yang diberi nomor baris-bijaksana. Each pane
contains an axes. Setiap panel berisi sumbu. Subsequent plots are output to the current pane. plot
berikutnya adalah output ke pane saat ini.
subplot(m,n,p) creates an axes in the p -th pane of a figure divided into an m -by- n matrix of
rectangular panes. menciptakan kapak di p ke panel-seorang tokoh dibagi ke dalam m -by- n
matriks panel persegi panjang. The new axes becomes the current axes. Sumbu baru menjadi
sumbu saat ini.
subplot(h) makes the axes with handle h current for subsequent plotting commands. membuat
kapak dengan pegangan h saat merencanakan perintah berikutnya.
subplot('Position',[left bottom width height]) creates an axes at the position
specified by a four-element vector. left , bottom , width , and height are in normalized
coordinates in the range from 0.0 to 1.0. menciptakan kapak di posisi yang ditetapkan oleh-
elemen vektor empat. left , bottom , width , dan height berada di koordinat normal dalam
kisaran 0,0-1,0.
h = subplot(...) returns the handle to the new axes. kembali pegangan untuk sumbu baru.

Remarks Keterangan
If a subplot specification causes a new axes to overlap an existing axes, subplot deletes the
existing axes. subplot(1,1,1) or clf deletes all axes objects and returns to the default
subplot(1,1,1) configuration. Jika subplot spesifikasi menyebabkan kapak baru untuk
tumpang tindih dengan sumbu yang ada, subplot menghapus sumbu yang ada.
subplot(1,1,1) atau clf menghapus semua objek kapak dan kembali ke default
subplot(1,1,1) konfigurasi.
You can omit the parentheses and specify subplot as. Anda bisa menghilangkan tanda kurung
dan tentukan sebagai anak petak.
subplot mnp subplot MNP
where m refers to the row, n refers to the column, and p specifies the pane. dimana m merujuk
pada baris, n mengacu pada kolom, dan p menentukan panel.

Special Case - subplot(111) Khusus Kasus - anak petak (111)

The command subplot(111) is not identical in behavior to subplot(1,1,1) and exists only for
compatibility with previous releases. Perintah subplot(111) tidak identik dalam perilaku untuk
subplot(1,1,1) dan hanya ada untuk kompatibilitas dengan rilis sebelumnya. This syntax does
not immediately create an axes, but instead sets up the figure so that the next graphics command
executes a clf reset (deleting all figure children) and creates a new axes in the default
position. Sintaks ini tidak segera membuat kapak, tetapi menyiapkan sosok sehingga perintah
grafis berikutnya mengeksekusi sebuah clf reset (menghapus semua anak gambar) dan
menciptakan sebuah kapak baru dalam posisi default. This syntax does not return a handle, so it
is an error to specify a return argument. Sintaks ini tidak kembali menangani, sehingga kesalahan
untuk menentukan argumen kembali. (This behavior is implemented by setting the figure's
NextPlot property to replace .) (Perilaku ini dilaksanakan dengan menetapkan angka itu
NextPlot properti untuk replace .)

Examples Contoh
To plot income in the top half of a figure and outgo in the bottom half, Untuk plot income di
atas setengah dari seorang tokoh dan outgo di bawah setengah,
income = [3.2 4.1 5.0 5.6]; penghasilan = [3.2 4.1 5.0 5.6];
outgo = [2.5 4.0 3.35 4.9]; ongkos = [2,5 4,0 3,35 4,9];
subplot(2 , 1 , 1); plot(income) anak petak (2 , 1 , 1); plot (laba)
subplot(2 , 1 , 2); plot(outgo) anak petak (2 , 1 , 2); plot
(keberangkatan)
The following illustration shows four subplot regions and indicates the command used to create
each. Ilustrasi berikut menunjukkan empat daerah anak petak dan menunjukkan perintah yang
digunakan untuk membuat masing-masing.

Anda mungkin juga menyukai