Code Monkey home page Code Monkey logo

Comments (18)

glamp avatar glamp commented on July 18, 2024

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.

inti avatar inti commented on July 18, 2024

I really mean something like the geom_linerange on R's ggplot2, http://docs.ggplot2.org/current/geom_linerange.html

from ggpy.

glamp avatar glamp commented on July 18, 2024

Ahh gotcha. Not implemented yet but we can put it on the TODO.

from ggpy.

glamp avatar glamp commented on July 18, 2024

Would you be interested in working on this?

from ggpy.

inti avatar inti commented on July 18, 2024

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.

inti avatar inti commented on July 18, 2024

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.

glamp avatar glamp commented on July 18, 2024

No but there should be. I'll add a contributing section to the docs.

from ggpy.

inti avatar inti commented on July 18, 2024

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.

dengemann avatar dengemann commented on July 18, 2024

@inti @glamp any progress on this end? Would be crucial to have.

from ggpy.

has2k1 avatar has2k1 commented on July 18, 2024

@dengemann tryout geom_linerange.

from ggpy.

dengemann avatar dengemann commented on July 18, 2024

@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.

has2k1 avatar has2k1 commented on July 18, 2024

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.

dengemann avatar dengemann commented on July 18, 2024

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.

dengemann avatar dengemann commented on July 18, 2024

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.

has2k1 avatar has2k1 commented on July 18, 2024

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.

dengemann avatar dengemann commented on July 18, 2024

@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.

glamp avatar glamp commented on July 18, 2024

geom_errorbar available

from ggpy.

corytu avatar corytu commented on July 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.