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 7819097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:47:55+00:00 2026-06-02T06:47:55+00:00

Unhindered by any pre-existing knowledge of R, Rpy2 and ggplot2 I would never the

  • 0

Unhindered by any pre-existing knowledge of R, Rpy2 and ggplot2 I would never the less like to create a scatterplot of a trivial table from Python.

To set this up I’ve just installed:

  • Ubuntu 11.10 64 bit
  • R version 2.14.2 (from r-cran mirror)
  • ggplot2 (through R> install.packages('ggplot2'))
  • rpy2-2.2.5 (through easy_install)

Following this I am able to plot some example dataframes from an interactive R session using ggplot2.

However, when I merely try to import ggplot2 as I’ve seen in an example I found online, I get the following error:

from rpy2.robjects.lib import ggplot2
  File ".../rpy2/robjects/lib/ggplot2.py", line 23, in <module>
    class GGPlot(robjects.RObject):
  File ".../rpy2/robjects/lib/ggplot2.py", line 26, in GGPlot
    _rprint = ggplot2_env['print.ggplot']
  File ".../rpy2/robjects/environments.py", line 14, in __getitem__
    res = super(Environment, self).__getitem__(item)
LookupError: 'print.ggplot' not found

Can anyone tell me what I am doing wrong? As I said the offending import comes from an online example, so it might well be that there is some other way I should be using gplot2 through rpy2.


For reference, and unrelated to the problem above, here’s an example of the dataframe I would like to plot, once I get the import to work (should not be a problem looking at the examples). The idea is to create a scatter plot with the lengths on the x axis, the percentages on the Y axis, and the boolean is used to color the dots, whcih I would then like to save to a file (either image or pdf). Given that these requirements are very limited, alternative solutions are welcome as well.

     original.length row.retained percentage.retained
1               1875        FALSE                11.00
2               1143        FALSE                23.00
3                960        FALSE                44.00
4               1302        FALSE                66.00
5               2016        TRUE                 87.00
  • 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-06-02T06:47:56+00:00Added an answer on June 2, 2026 at 6:47 am

    There were changes in the R package ggplot2 that broke the rpy2 layer.
    Try with a recent (I just fixed this) snapshot of the “default” branch (rpy2-2.3.0-dev) for the rpy2 code on bitbucket.

    Edit: rpy2-2.3.0 is a couple of months behind schedule. I just pushed a bugfix release rpy2-2.2.6 that should address the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to redirect a user to an 'Alert Page' if they come
I would like to ask what's the use of System.property in this source code?
I would like to assign datacontext and static values in a single Combobox .
Consider the following (simplistic) situation: CREATE TABLE PARENT ( PARENT_ID INT PRIMARY KEY );
I'm using Google App Engine and thus Big Table. I have a person entity
I am trying to create a chart with invient charts in vaadin. I added
I use Symfony 1.4.11. I added search to my project, like in Jobeet tutorial
$index = Zend_Search_Lucene::create($indexpath); $doc = Zend_Search_Lucene_Document_Html::loadHTMLFile ($targeturl); $title = $doc->title; $body = $doc->body; $doc->addField(Zend_Search_Lucene_Field::Text('title',
I have a problem with my radio buttons. What I'm doing is I create
Is there any way in Mustache of limiting the number of characters a Mustache

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.