par() की Settings
par आपके drawing area की settings बदलता है, draw करने से पहले paper size और pen style चुनने की तरह। आप, उदाहरण के लिए, एक page पर कई plots रख सकते हैं।
In this page:
Syntax
old_par <- par(mfrow = c(rows, cols))
# draw plots here
par(old_par)
par() Settings
par() global graphical parameters set या query करता है जो बाद के plots को affect करते हैं, जैसे कई plots को एक grid में arrange करने के लिए mfrow = c(rows, cols), या margins adjust करने के लिए mar।
यह वह तरीका है जिससे आप एक single plot() call के अपने arguments से आगे overall plotting layout customize करते हैं। par() से की गई settings reset न होने तक बाकी session के लिए persist करती हैं।
Note:
par(mfrow = c(2, 2)) अगले चार plots को same plotting window में एक 2x2 grid में arrange करता है।
उदाहरण: par() Settings
cat("par(mfrow = c(2, 2)) would arrange the next 4 plots into a 2x2 grid\n")
cat("par(mar = c(4, 4, 2, 1)) would adjust the plot margins (bottom, left, top, right)\n")
Login to try C/C++/Java/PHP code in the editor
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the
view already swaps in the hi_ translation fields (or blanks these
out if untranslated), so this renders correctly for both languages
without a lang_code check here. #}
आम गलतियां
par(mfrow = c(2, 2))बदलना और कभी इसे reset न करना, इसलिए बाद के plots small grid में रहते हैं।- एक नया plot device खोलने से पहले
par()set करना, इसलिए settings खो जाती हैं। marसे margins बहुत छोटी बनाना, जो axis labels और titles काट देता है।
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: