Comments (18)
Do you mean for stat_smooth? If so ten set se=True. Although I'm suspicious the bars are being done correctly (or at least not the same as ggplot2).
On Oct 15, 2013, at 9:46 AM, Inti Pedroso [email protected] wrote:
This is simply great guys!
is there a way to make error bars with the current functions?
Thanks in advance,
Inti—
Reply to this email directly or view it on GitHub.
from ggpy.
I really mean something like the geom_linerange on R's ggplot2, http://docs.ggplot2.org/current/geom_linerange.html
from ggpy.
Ahh gotcha. Not implemented yet but we can put it on the TODO.
from ggpy.
Would you be interested in working on this?
from ggpy.
I would need to see some examples of hoe you are coding the guts of ggplot ... I cannot commit although I would like to be able to do it. I'll try to dig into your code to see if it seems possible for me to do it. I am not a expert python programmer either but I can help ... I guess :)
from ggpy.
Do you have some example code of the basic components needed or can you point me to some code where I can get the general idea?
Thanks
from ggpy.
No but there should be. I'll add a contributing section to the docs.
from ggpy.
I reckon one can get away with the geom_vline and the geom_hline to make error bars.
I tried this but it did not work.
from ggplot import *
import numpy as np
import pandas as pd
%pylab inline
n = 10
x = np.random.normal(size=10)
data = pd.DataFrame({'x': x,
'y': x + np.random.normal(0,0.1,size=10),
'se': x**2})
data['y_min'] = data.y - data.se
data['y_max'] = data.y + data.se
ggplot(data,aes('x','y')) + geom_point() + geom_vline(aes(ymin='y_min',ymax='y_max'))
it does not work either with
ggplot(data,aes('x','y')) + geom_point() + geom_vline(ymin='y_min',ymax='y_max')
Am I doing something wrong with the geom_vline?
I have not found any examples using it
Thanks in advance
from ggpy.
@inti @glamp any progress on this end? Would be crucial to have.
from ggpy.
@dengemann tryout geom_linerange
.
from ggpy.
@has2k1 thanks! Trying to guess the API from the code since I couldn't find any example.
from ggplot import *
(ggplot(aes(x='factor(cyl)'), data=mtcars)
+ geom_linerange(x=mtcars['cyl'], ymin=[0.2, .2, .3], ymax=[.3, .4, .5]))
It seems this is not exactly it. Did you guys actually consider making small examples requirements for contributions? Also I was wondering whether you considered maintaining a dev version of the docs. This would allow to make the current state of the project more visible. Just throwing some thoughts.
from ggpy.
geom_linereange
just came in recently, I haven't yet verified that the API is equivalent to that of ggplot2, but that is the objective.
What exactly do you mean by a "development version of the docs"?
from ggpy.
geom_linereange just came in recently,
ok, let me check.
What exactly do you mean by a "development version of the docs"?
@has2k1 I had the impression that the examples / doc on the webpage don't reflect the dev on the master branch but the latest stable version (pypi release). I might be mistaken though.
from ggpy.
ok, let me check.
ok, got it. The R example seems to work.
What exactly do you mean by a "development version of the docs"?
and
just came in recently
The other part of my question proposal was to make such tiny example snippets requirements for merging PRs that add new API / functions. In combination with a nightly public doc build this would be an efficient way of communicating + documenting recent changes.
from ggpy.
Yeah that would be great, on par with matplotlib, pandas, ... . On the whole the documentation is yet to be properly sorted out. As we chase ggplot2 in API similarity we should be able to borrow the examples they have over there.
Good suggestions.
from ggpy.
@has2k1 I think the way to go would be a geom_errorbar --- also see here http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)/ + #361
from ggpy.
geom_errorbar available
from ggpy.
@glamp Excuse me, by "available" do you mean that it is ready for use? I just checked the source code but I can't understand why it is working. I can't find related documentation either. Thanks.
from ggpy.
Related Issues (20)
- Issue with scale_color_brewer HOT 1
- [Feature Request]: Plot directly onto a matplotlib axis HOT 1
- the numbers squeeze on the x-axis or y-axis
- Wrong code
- Is this project dead? HOT 16
- "metaclass conflict" error when using ggplot 0.6.8 with six 1.10.0+
- Import does not work with pandas 0.23.4
- unable to import in jupyter notebook HOT 5
- Warning received when using color aesthetic with geom_point
- Import issue in jupyter notebook
- AttributeError: module 'pandas' has no attribute 'tslib' HOT 35
- Can't facet on variable with more than 9 levels
- facet_grid fail with a category type
- facet_grid repeat x-axis
- pandas sort issue
- How about make it available with dfply?
- Link to an actively developed project called "plotnine" which provides ggplot functionality in python.
- ggplot installs for python3.9.1.0, but import ggplot gets error re pandas attribute tslib HOT 2
- plot multiple geoms on top of each other
- Looking for `ggplot` substitution HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ggpy.