1
$\begingroup$

I have two column data as magnitude and period of several stars. I have plotted magnitude vs. period, but I need to add a column as error bar for Y values. How can I write the code to put the error bars on data points?

$\endgroup$
  • $\begingroup$ Hi, welcome on the Astronomy SE! Your question looks more like about python as about astronomy, but maybe you will have luck here. $\endgroup$ – peterh - Reinstate Monica Jun 1 '18 at 1:46
  • 3
    $\begingroup$ This should be asked on stack overflow, as it is a programming question but try matplotlib.org/api/_as_gen/matplotlib.pyplot.errorbar.html $\endgroup$ – James K Jun 1 '18 at 7:02
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because it is a programming question. $\endgroup$ – James K Jun 1 '18 at 7:03
  • $\begingroup$ In the slim case this gets migrated, I'd advise adding more information to the post, such as further descriptions of what you're looking for, plus what code you have so far. $\endgroup$ – user10106 Jun 1 '18 at 7:33
  • 1
    $\begingroup$ If your question would be closed, you may re-ask it some other, more programming related SE sites: stackoverflow.com , stats.stackexchange.com or on cs.stackexchange.com . Note, programming sites tend to be more restrictive about the questions, your current question in its current form will be closed on them as unclear! Give them much more details, example code, what you tried, what exactly you want to do, and so on! $\endgroup$ – peterh - Reinstate Monica Jun 1 '18 at 7:38