"USR" parameter

Source: Internet
Author: User

Problem:

You can see this parameter in many places, such

Text (PAR ("USR") [1] + 5, par ("USR") [4] + 12, "NBA per game performance of top 50 corers ", XPD = true, font = 2, cex = 1.5)

Answer:

Once a plot has been created, par ("USR") returns a vector with the extreme coordinates of the user's plow.region. these can be used to place text and legends into a corner of a plot. the coordinates are,
In order, xleft, xright, ybottom, and ytop. Note the use of the adj parameter in the callto the text () function; these adjust the position of the text.


# Create the plot. This sets the "USR" coordinates.

Plot (1: 10)

# PAR ("USR") returns a vector containing xleft, xright, ybottom, ytop.

USR <-PAR ("USR ")

# Place the text. Note the use of the adj parameter.

# Left top corner:

Text (USR [1], USR [4], "Left top", adj = C (0, 1), Col = "blue ")

# Left bottom corner:

Text (USR [1], USR [3], "Left Bottom", adj = C (0, 0), Col = "blue ")

# Right top corner:

Text (USR [2], USR [4], "Right top", adj = C (1, 1), Col = "blue ")

# Right bottom corner:

Text (USR [2], USR [3], "Right Bottom", adj = C (1, 0), Col = "blue ")

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.