Questions tagged [python-ggplot]

A python plotting library emulating R's ggplot2.

A python plotting library emulating R's ggplot2. https://github.com/yhat/ggpy

205 questions
5
votes
7 answers

Cannot install ggplot with anaconda

I want to be able to use geom_smooth in ggplot. However, when I typed conda install ggplot, I get the error no packages found in current win-32 channels matching ggplot. Anyone know what is going on?
user4352158
  • 731
  • 4
  • 13
  • 24
5
votes
4 answers

Is there a Python API for R's ggplot2?

My question is as simple as the title: i want to use R's ggplot2 but all my data handling is done in Python: is there a Python API for ggplot2, or an easy way to use ggplot2 through Python ?
ruben baetens
  • 2,806
  • 6
  • 25
  • 31
4
votes
1 answer

How to add a DynamoDB global secondary Index via Python/Boto3

Is it possible to add a Global Secondary Index to and existing DynamoDB table AFTER it has been created? I am using Python 3.x with Boto3 and have not been able to find any examples of them being added to the table after it was created.
Doug Bower
  • 319
  • 2
  • 14
4
votes
1 answer

ggplot geom_bar is plotting counts rather than values, even with stat="identity" setting enabled

I am using ggplot in python and just trying to make a basic bar chart. For reasons I don't understand, the bar heights are corresponding to counts of variable names, rather than the actual variables. Simple example pattern = pd.Series(['standard',…
ohnoplus
  • 1,205
  • 1
  • 17
  • 29
4
votes
1 answer

Can't install ggplot with anaconda

(I'm aware of this question Cannot install ggplot with anaconda but that is aimed at Windows, and I'm running a Linux OS) I'm attempting to install the ggplot package in a python3 (v3.6.0) Anaconda environment: $ conda install ggplot Fetching…
Gabriel
  • 40,504
  • 73
  • 230
  • 404
4
votes
0 answers

coord_flip() does not work

I tried to flip the coordinates on my bar plot in ggplot2 on python3 but it was not successful. Am I doing something wrong? import ggplot print(ggplot.__version__) 0.11.5 from ggplot import * import numpy as np import pandas as pd #…
vdi
  • 743
  • 10
  • 20
4
votes
2 answers

Python: Plot a bar graph for a pandas data frame with x axis using a given column

I want to plot a bar chart for the following pandas data frame on Jupyter Notebook. | Month | number ------------------------- 0 | Apr | 6.5 1 | May | 7.3 2 | Jun | 3.9 3 | Jul | 5.1 4 | Aug | 4.1 I…
Edamame
  • 23,718
  • 73
  • 186
  • 320
4
votes
2 answers

Changing axis label size in Python ggplot

In R: p + theme(axis.title = element_text(size = 12)) How can you do this in the Python implementation? Note: I can't find a comprehensive source of documentation for ggplot in Python, which is making presumably simple requests like this very…
christopherlovell
  • 3,800
  • 4
  • 19
  • 26
4
votes
1 answer

Can't import ggplot module in iPython

I'm trying to use ggplot in an Anaconda iPython notebook. I ran %matplotlib inline and from ggplot import *, but I just get the following error: ImportError Traceback (most recent call…
DaBron
  • 43
  • 1
  • 1
  • 3
4
votes
1 answer

python ggplot set axis range for datetime

I am trying to plot time-series data in Python using ggplot and am unable to fix the scale. Here's my most recent effort--first I set the desired max and min values of the x axis as xmin and xmax: xmin=pd.to_datetime('2011-04-01') …
TCS
  • 451
  • 6
  • 18
4
votes
2 answers

Is there a way to plot a pandas series in ggplot?

I'm experimenting with pandas and non-matplotlib plotting. Good suggestions are here. This question regards yhat's ggplot and I am running into two issues. Plotting a series in pandas is easy. frequ.plot() I don't see how to do this in the ggplot…
zerovector
  • 1,350
  • 1
  • 10
  • 12
4
votes
5 answers

replicating R/ggplot2 colours in python

This link has R code to replicate ggplot's colours: Plotting family of functions with qplot without duplicating data I have had a go at replicating the code in python - but the results are not right ... import pandas as pd import numpy as np import…
Mark Graph
  • 4,969
  • 6
  • 25
  • 37
4
votes
1 answer

How do I make stat_smooth work in ggplot-python?

That's my code: import pandas as pd import pandas.io.sql as sqlio from ggplot import * from db import conn sql = "SELECT * FROM history WHERE time > (NOW() - INTERVAL '1 day')::date" df = sqlio.read_frame(sql, conn) conn.close() lng =…
Piotr Zduniak
  • 97
  • 2
  • 8
3
votes
1 answer

Plotting data from different datasets using plotnine and pandas

First off, I think it would be helpful to offer some background about what I want to do. I have a time-series dataset that describes air quality in a region, with hour resolution. Each row is an observation, each column is a different parameter (eg.…
3
votes
3 answers

How do I use Matplotlib to save an image generated with ggplot?

While this part works import matplotlib.pyplot as plt from ggplot import * import numpy as np import pandas as pd df = pd.DataFrame({'Height':np.random.randn(10), 'Weight':np.random.randn(10), 'Gender':…
teddy browns
  • 141
  • 1
  • 6
1
2
3
13 14