SlideShare a Scribd company logo
www.r-squared.in/git-hub
dataCrunch Data Visualization With R
Learn To Modify Font Of Graphical Parameters
dataCrunch
Font
Slide 2
dataCrunchFont
Slide 3
The font argument can be used along with main, sub, axis and lab arguments to specify the font of
the title, subtitle, axes and the labels.
Feature Argument
Title font.main
Subtitle font.sub
Axis font.axis
Labels font.lab
The font argument takes values from 1 - 5. The font type represented by each value is shown in the
above table.
Value Font Type
1 Plain
2 Bold
3 Italic
4 Bold Italic
5 Symbol
dataCrunchFont: Title
Slide 4
# modify the font of the title
plot(mtcars$disp, mtcars$mpg,
main = "Displacement vs Miles Per Gallon",
font.main = 1)
Description
The font of the title can be modified using the font.
main argument in the plot() function.
Code
dataCrunchFont: Title
Slide 5
The below plot depicts the appearance of the title when different options for font type are applied:
dataCrunchFont: Subtitle
Slide 6
# modify the font of the subtitle
plot(mtcars$disp, mtcars$mpg,
sub= "Displacement vs Miles Per Gallon",
font.sub = 3)
Description
The font of the subtitle can be modified using the
font.sub argument in the plot() function.
Code
dataCrunchFont: Subtitle
Slide 7
The below plot depicts the appearance of the subtitle when different options for font type are applied:
dataCrunchFont: Axis
Slide 8
# modify the font of the axis
plot(mtcars$disp, mtcars$mpg,
font.axis = 3)
Description
The font of the axis can be modified using the
font.axis argument in the plot() function.
Code
dataCrunchFont: Axis
Slide 9
The below plot depicts the appearance of the axis when different options for font type are applied:
dataCrunchFont: Labels
Slide 10
# modify the font of the labels
plot(mtcars$disp, mtcars$mpg,
xlab = "Displacement",
ylab = "Miles Per Gallon",
font.lab = 3)
Description
The font of the labels can be modified using the
font.lab argument in the plot() function.
Code
dataCrunchFont: Labels
Slide 11
The below plot depicts the appearance of the labels when different options for font type are applied:
dataCrunch
Font Size
Slide 12
dataCrunchFont Size
Slide 13
The cex argument can be used along with main, sub, axis and lab arguments to specify the font size
of the title, subtitle, axes and the labels.
Feature Argument
Title cex.main
Subtitle cex.sub
Axis cex.axis
Labels cex.lab
The values taken by the cex argument are relative to 1 i.e the default size is represented by 1 and if
the supplied value is less than 1, the size of the font will be relatively smaller, and if the supplied value
is greater than 1, the size of the font will be relatively bigger.
dataCrunchFont Size: Title
Slide 14
# modify the font size of the title
plot(mtcars$disp, mtcars$mpg,
main = "Scatter Plot",
cex.main = 1.5)
Description
The font size of the title can be modified using the
cex.main argument in the plot() function.
Code
dataCrunchFont Size: Title
Slide 15
The below plot depicts the appearance of the title when different options for font size are applied:
dataCrunchFont Size: Subtitle
Slide 16
# modify the font size of the subtitle
plot(mtcars$disp, mtcars$mpg,
sub= "Scatter Plot",
cex.sub = 1.5)
Description
The font size of the subtitle can be modified using
the cex.sub argument in the plot() function.
Code
dataCrunchFont: Subtitle
Slide 17
The below plot depicts the appearance of the subtitle when different options for font size are applied:
dataCrunchFont Size: Axis
Slide 18
# modify the font size of the axis
plot(mtcars$disp, mtcars$mpg,
cex.axis = 1.5)
Description
The font size of the axis can be modified using the
cex.axis argument in the plot() function.
Code
dataCrunchFont Size: Axis
Slide 19
The below plot depicts the appearance of the axis when different options for font size are applied:
dataCrunchFont Size: Labels
Slide 20
# modify the font size of the labels
plot(mtcars$disp, mtcars$mpg,
xlab = "Displacement",
ylab = "Miles Per Gallon",
cex.lab = 1.5)
Description
The font size of the labels can be modified using the
cex.lab argument in the plot() function.
Code
dataCrunchFont Size: Labels
Slide 21
The below plot depicts the appearance of the subtitle when different options for font size are applied:
dataCrunch
Slide 22
Visit dataCrunch for
tutorials on:
→ R Programming
→ Business Analytics
→ Data Visualization
→ Web Applications
→ Package Development
→ Git & GitHub

More Related Content

What's hot (18)

DOCX
Access intermediate 2010 final project new
clscott1
 
PDF
R Programming: Numeric Functions In R
Rsquared Academy
 
PPTX
An introduction to matlab
Dr. Andrew Wallace PhD
 
PDF
Chapter13 two-dimensional-array
Deepak Singh
 
PPT
Extreme querying with_analytics
Gary Myers
 
PPT
R studio
Kinza Irshad
 
PDF
Excel/R
Andrija Djurovic
 
PPTX
statistical computation using R- an intro..
Kamarudheen KV
 
PPTX
Lecture 1 mte 407
rumanatasnim415
 
PPTX
Lecture 1 mte 407
rumanatasnim415
 
PDF
R-Excel Integration
Andrija Djurovic
 
PDF
Introduction to matlab
Sourabh Bhattacharya
 
PDF
Doc 20180130-wa0004
HarithaRanasinghe
 
PDF
Assignment3
Mahmoud
 
ODT
Assigment 3
sukumaraser
 
DOCX
Conversion from infix to prefix using stack
Haqnawaz Ch
 
PDF
The matplotlib Library
Haim Michael
 
PDF
Day 2 examples u6w14
jchartiersjsd
 
Access intermediate 2010 final project new
clscott1
 
R Programming: Numeric Functions In R
Rsquared Academy
 
An introduction to matlab
Dr. Andrew Wallace PhD
 
Chapter13 two-dimensional-array
Deepak Singh
 
Extreme querying with_analytics
Gary Myers
 
R studio
Kinza Irshad
 
statistical computation using R- an intro..
Kamarudheen KV
 
Lecture 1 mte 407
rumanatasnim415
 
Lecture 1 mte 407
rumanatasnim415
 
R-Excel Integration
Andrija Djurovic
 
Introduction to matlab
Sourabh Bhattacharya
 
Doc 20180130-wa0004
HarithaRanasinghe
 
Assignment3
Mahmoud
 
Assigment 3
sukumaraser
 
Conversion from infix to prefix using stack
Haqnawaz Ch
 
The matplotlib Library
Haim Michael
 
Day 2 examples u6w14
jchartiersjsd
 

More from Rsquared Academy (20)

PDF
Handling Date & Time in R
Rsquared Academy
 
PDF
Market Basket Analysis in R
Rsquared Academy
 
PDF
Practical Introduction to Web scraping using R
Rsquared Academy
 
PDF
Joining Data with dplyr
Rsquared Academy
 
PDF
Explore Data using dplyr
Rsquared Academy
 
PDF
Data Wrangling with dplyr
Rsquared Academy
 
PDF
Writing Readable Code with Pipes
Rsquared Academy
 
PDF
Introduction to tibbles
Rsquared Academy
 
PDF
Read data from Excel spreadsheets into R
Rsquared Academy
 
PDF
Read/Import data from flat/delimited files into R
Rsquared Academy
 
PDF
Variables & Data Types in R
Rsquared Academy
 
PDF
How to install & update R packages?
Rsquared Academy
 
PDF
How to get help in R?
Rsquared Academy
 
PDF
Introduction to R
Rsquared Academy
 
PDF
RMySQL Tutorial For Beginners
Rsquared Academy
 
PDF
R Markdown Tutorial For Beginners
Rsquared Academy
 
PDF
R Programming: Introduction to Matrices
Rsquared Academy
 
PDF
R Programming: Introduction to Vectors
Rsquared Academy
 
PPTX
R Programming: Variables & Data Types
Rsquared Academy
 
PDF
R Programming: Mathematical Functions In R
Rsquared Academy
 
Handling Date & Time in R
Rsquared Academy
 
Market Basket Analysis in R
Rsquared Academy
 
Practical Introduction to Web scraping using R
Rsquared Academy
 
Joining Data with dplyr
Rsquared Academy
 
Explore Data using dplyr
Rsquared Academy
 
Data Wrangling with dplyr
Rsquared Academy
 
Writing Readable Code with Pipes
Rsquared Academy
 
Introduction to tibbles
Rsquared Academy
 
Read data from Excel spreadsheets into R
Rsquared Academy
 
Read/Import data from flat/delimited files into R
Rsquared Academy
 
Variables & Data Types in R
Rsquared Academy
 
How to install & update R packages?
Rsquared Academy
 
How to get help in R?
Rsquared Academy
 
Introduction to R
Rsquared Academy
 
RMySQL Tutorial For Beginners
Rsquared Academy
 
R Markdown Tutorial For Beginners
Rsquared Academy
 
R Programming: Introduction to Matrices
Rsquared Academy
 
R Programming: Introduction to Vectors
Rsquared Academy
 
R Programming: Variables & Data Types
Rsquared Academy
 
R Programming: Mathematical Functions In R
Rsquared Academy
 
Ad

Recently uploaded (20)

PDF
Research Methodology Overview Introduction
ayeshagul29594
 
PDF
Optimizing Large Language Models with vLLM and Related Tools.pdf
Tamanna36
 
PPTX
apidays Helsinki & North 2025 - From Chaos to Clarity: Designing (AI-Ready) A...
apidays
 
PPTX
big data eco system fundamentals of data science
arivukarasi
 
PPTX
SHREYAS25 INTERN-I,II,III PPT (1).pptx pre
swapnilherage
 
PDF
Technical-Report-GPS_GIS_RS-for-MSF-finalv2.pdf
KPycho
 
PPTX
apidays Helsinki & North 2025 - APIs at Scale: Designing for Alignment, Trust...
apidays
 
PDF
apidays Singapore 2025 - Trustworthy Generative AI: The Role of Observability...
apidays
 
PPTX
05_Jelle Baats_Tekst.pptx_AI_Barometer_Release_Event
FinTech Belgium
 
PPTX
apidays Helsinki & North 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (A...
apidays
 
PDF
The Best NVIDIA GPUs for LLM Inference in 2025.pdf
Tamanna36
 
PPTX
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
PPTX
thid ppt defines the ich guridlens and gives the information about the ICH gu...
shaistabegum14
 
PPTX
apidays Helsinki & North 2025 - Running a Successful API Program: Best Practi...
apidays
 
PPT
Growth of Public Expendituuure_55423.ppt
NavyaDeora
 
PDF
The European Business Wallet: Why It Matters and How It Powers the EUDI Ecosy...
Lal Chandran
 
PPTX
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
PPTX
apidays Singapore 2025 - From Data to Insights: Building AI-Powered Data APIs...
apidays
 
PDF
NIS2 Compliance for MSPs: Roadmap, Benefits & Cybersecurity Trends (2025 Guide)
GRC Kompas
 
PDF
apidays Singapore 2025 - Building a Federated Future, Alex Szomora (GSMA)
apidays
 
Research Methodology Overview Introduction
ayeshagul29594
 
Optimizing Large Language Models with vLLM and Related Tools.pdf
Tamanna36
 
apidays Helsinki & North 2025 - From Chaos to Clarity: Designing (AI-Ready) A...
apidays
 
big data eco system fundamentals of data science
arivukarasi
 
SHREYAS25 INTERN-I,II,III PPT (1).pptx pre
swapnilherage
 
Technical-Report-GPS_GIS_RS-for-MSF-finalv2.pdf
KPycho
 
apidays Helsinki & North 2025 - APIs at Scale: Designing for Alignment, Trust...
apidays
 
apidays Singapore 2025 - Trustworthy Generative AI: The Role of Observability...
apidays
 
05_Jelle Baats_Tekst.pptx_AI_Barometer_Release_Event
FinTech Belgium
 
apidays Helsinki & North 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (A...
apidays
 
The Best NVIDIA GPUs for LLM Inference in 2025.pdf
Tamanna36
 
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
thid ppt defines the ich guridlens and gives the information about the ICH gu...
shaistabegum14
 
apidays Helsinki & North 2025 - Running a Successful API Program: Best Practi...
apidays
 
Growth of Public Expendituuure_55423.ppt
NavyaDeora
 
The European Business Wallet: Why It Matters and How It Powers the EUDI Ecosy...
Lal Chandran
 
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
apidays Singapore 2025 - From Data to Insights: Building AI-Powered Data APIs...
apidays
 
NIS2 Compliance for MSPs: Roadmap, Benefits & Cybersecurity Trends (2025 Guide)
GRC Kompas
 
apidays Singapore 2025 - Building a Federated Future, Alex Szomora (GSMA)
apidays
 
Ad

Data Visualization With R: Learn To Modify Font Of Graphical Parameters

  • 1. www.r-squared.in/git-hub dataCrunch Data Visualization With R Learn To Modify Font Of Graphical Parameters
  • 3. dataCrunchFont Slide 3 The font argument can be used along with main, sub, axis and lab arguments to specify the font of the title, subtitle, axes and the labels. Feature Argument Title font.main Subtitle font.sub Axis font.axis Labels font.lab The font argument takes values from 1 - 5. The font type represented by each value is shown in the above table. Value Font Type 1 Plain 2 Bold 3 Italic 4 Bold Italic 5 Symbol
  • 4. dataCrunchFont: Title Slide 4 # modify the font of the title plot(mtcars$disp, mtcars$mpg, main = "Displacement vs Miles Per Gallon", font.main = 1) Description The font of the title can be modified using the font. main argument in the plot() function. Code
  • 5. dataCrunchFont: Title Slide 5 The below plot depicts the appearance of the title when different options for font type are applied:
  • 6. dataCrunchFont: Subtitle Slide 6 # modify the font of the subtitle plot(mtcars$disp, mtcars$mpg, sub= "Displacement vs Miles Per Gallon", font.sub = 3) Description The font of the subtitle can be modified using the font.sub argument in the plot() function. Code
  • 7. dataCrunchFont: Subtitle Slide 7 The below plot depicts the appearance of the subtitle when different options for font type are applied:
  • 8. dataCrunchFont: Axis Slide 8 # modify the font of the axis plot(mtcars$disp, mtcars$mpg, font.axis = 3) Description The font of the axis can be modified using the font.axis argument in the plot() function. Code
  • 9. dataCrunchFont: Axis Slide 9 The below plot depicts the appearance of the axis when different options for font type are applied:
  • 10. dataCrunchFont: Labels Slide 10 # modify the font of the labels plot(mtcars$disp, mtcars$mpg, xlab = "Displacement", ylab = "Miles Per Gallon", font.lab = 3) Description The font of the labels can be modified using the font.lab argument in the plot() function. Code
  • 11. dataCrunchFont: Labels Slide 11 The below plot depicts the appearance of the labels when different options for font type are applied:
  • 13. dataCrunchFont Size Slide 13 The cex argument can be used along with main, sub, axis and lab arguments to specify the font size of the title, subtitle, axes and the labels. Feature Argument Title cex.main Subtitle cex.sub Axis cex.axis Labels cex.lab The values taken by the cex argument are relative to 1 i.e the default size is represented by 1 and if the supplied value is less than 1, the size of the font will be relatively smaller, and if the supplied value is greater than 1, the size of the font will be relatively bigger.
  • 14. dataCrunchFont Size: Title Slide 14 # modify the font size of the title plot(mtcars$disp, mtcars$mpg, main = "Scatter Plot", cex.main = 1.5) Description The font size of the title can be modified using the cex.main argument in the plot() function. Code
  • 15. dataCrunchFont Size: Title Slide 15 The below plot depicts the appearance of the title when different options for font size are applied:
  • 16. dataCrunchFont Size: Subtitle Slide 16 # modify the font size of the subtitle plot(mtcars$disp, mtcars$mpg, sub= "Scatter Plot", cex.sub = 1.5) Description The font size of the subtitle can be modified using the cex.sub argument in the plot() function. Code
  • 17. dataCrunchFont: Subtitle Slide 17 The below plot depicts the appearance of the subtitle when different options for font size are applied:
  • 18. dataCrunchFont Size: Axis Slide 18 # modify the font size of the axis plot(mtcars$disp, mtcars$mpg, cex.axis = 1.5) Description The font size of the axis can be modified using the cex.axis argument in the plot() function. Code
  • 19. dataCrunchFont Size: Axis Slide 19 The below plot depicts the appearance of the axis when different options for font size are applied:
  • 20. dataCrunchFont Size: Labels Slide 20 # modify the font size of the labels plot(mtcars$disp, mtcars$mpg, xlab = "Displacement", ylab = "Miles Per Gallon", cex.lab = 1.5) Description The font size of the labels can be modified using the cex.lab argument in the plot() function. Code
  • 21. dataCrunchFont Size: Labels Slide 21 The below plot depicts the appearance of the subtitle when different options for font size are applied:
  • 22. dataCrunch Slide 22 Visit dataCrunch for tutorials on: → R Programming → Business Analytics → Data Visualization → Web Applications → Package Development → Git & GitHub