Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7167619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:36:46+00:00 2026-05-28T14:36:46+00:00

How to separate below two plots into different pages ? command onefile is meant

  • 0

How to separate below two plots into different pages ?

command onefile is meant for this purpose but somehow the following code draws only last of the two plots.

Any thing missing here ?

library(RSVGTipsDevice)

devSVGTips("svgplot9.svg", toolTipMode=1,onefile=TRUE,
title="SVG example plot 9: line and point types")
plot(c(0,20),c(0,5), type="n", xlab="x", ylab="y",
main="Example SVG plot with different line and point types")
for (i in 0:16) {
lines(i+(0:4), (1:5), col=max(i,1), pch=i, lty=i, type="b")
text(i, 0.5, lab=as.character(i), cex=2^(abs((i-8)/4)-1))
}


devSVGTips("svgplot9.svg", toolTipMode=1, onefile=TRUE,
title="SVG example plot 10: line and point types")
plot(c(0,20),c(0,5), type="n", xlab="x", ylab="y",
main="Example SVG plot with different line and point types")
for (i in 0:16) {
lines(i+(0:4), (1:5), col=max(i,1), pch=i, lty=i, type="b")
text(i, 0.5, lab=as.character(i), cex=2^(abs((i-8)/4)-1))
}

dev.off()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:36:48+00:00Added an answer on May 28, 2026 at 2:36 pm

    You may want to try with a single call to devSVGTips (the second one deletes the file that was being written), either with onefile=TRUE (the two plots are overlaid on a single page) or onefile=FALSE (the two plots are in the same file, but the XML code describing them is just concatenated: this may not be valid XML and/or may require further processing).

    # Same code as yours, indented, and with 
    # a different title for the second plot to see the difference.
    library(RSVGTipsDevice)
    
    devSVGTips(
      "svgplot9.svg", toolTipMode=1,
      onefile=FALSE, # Try with TRUE (overlaid plots) or FALSE (separate plots)
      title="SVG example plot 9: line and point types"
    )
    plot(
      c(0,20),c(0,5), type="n", xlab="x", ylab="y",
      main="Example SVG plot with different line and point types"
    )
    for (i in 0:16) {
      lines(i+(0:4), (1:5), col=max(i,1), pch=i, lty=i, type="b")
      text(i, 0.5, lab=as.character(i), cex=2^(abs((i-8)/4)-1))
    }
    
    #devSVGTips(
    #  "svgplot9.svg", toolTipMode=1, onefile=TRUE,
    #  title="SVG example plot 10: line and point types"
    #)
    plot(
      c(0,20),c(0,5), type="n", xlab="x", ylab="y",
      main="Example SVG plot with different line and point types (2)"
    )
    for (i in 0:16) {
      lines(i+(0:4), (1:5), col=max(i,1), pch=i, lty=i, type="b")
      text(i, 0.5, lab=as.character(i), cex=2^(abs((i-8)/4)-1))
    }
    
    dev.off()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have connected the two methods below to separate buttons in my UI but
I´m trying to separate a gridViewColumn into two rows. Im using default style for
I have below a javascript function which gets called on click of two separate
Based on the SELECT CASE below I want to show two separate columns within
I am using JSF and EJB as two separate project in my application. Below
I have two related validations on separate models. I can validate one way but
Given the below classes are in two separate header files and can appear in
How can I get two separate ASP.NET sites, in this case a Web Site
Do I need a separate controller for the below? http://localhost/bookmarks --> bookmarks controller http://localhost/bookmark/
I am trying to separate some asp logic out into a separate page. For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.