# Put error bars in specified plots spots in a graph?

Hello again i have the next problem: i have done a very nice graph and i need to incorporate the standard deviation on graph but i only need to put those error bars in just some plots on the graphic ,not in all, so it is possible to do this? I use the next code for plot my graph:

plotData = Partition[Riffle[data1, data2], 2]

ErrorListPlot[plotData]


Any suggestions?

I have modified mi plot commands and now i use this code :

ListLinePlot[newdata]


I know this a silly question but, is posible to include the bars in this command or is necesary to use the ErrorlistPlot command to put the error bars?

• If you don't want a bar in for instance the third point you could use: plotData2[[3]]=plotData2[[3,1]]. – Sjoerd C. de Vries Sep 17 '15 at 5:47
• Re: new update (which honestly, turns this into a different question) - yes, you can make your own function(s) to manipulate plot points and add bars, but why on earth go through the machinations when there's a built in package for that? You can join points/etc. with it. – ciao Sep 19 '15 at 5:20

You can explicitly specify this in the plot:

ErrorListPlot[{{{1, 1}, ErrorBar[0.2]}, {{2, 2},
ErrorBar[None]}, {{3, 4}, ErrorBar[0.3]}, {{4, 6},
ErrorBar[None]}, {{5, 7}, ErrorBar[0.8]}, {{6, 10},
ErrorBar[None]}}]


Per your comment, perhaps this fits the need:

Needs["ErrorBarPlots"]
(* fake some data *)
data = Partition[Riffle[RandomReal[{0, 10}, 10], RandomReal[{1/2, 1}, 10]], 2];
(* block with copy of data and list of points to exclude bars from *)
Block[{tmp = data, noBarredPoints = {1, 3, 6, 7}}, tmp[[noBarredPoints, 2]] = 0; ErrorListPlot[tmp]]
`

• I can´t use that formula because i have a list of data so i only use the command: ErrorListPlot[plotData] and i don't need to define the plots one by one so i can´t use that – Paul Damián Jiménez Nuño Sep 18 '15 at 4:46
• @PaulDamiánJiménezNuño Are you saying the points you don't want bars on are always the same? Else, you're going to be "define" something every time anyway. In any case, look at update, see if that floats your boat. – ciao Sep 18 '15 at 5:20
• Oh sorry if I sound rude in the previous comment i was in a hurry writing in a tablet. The points that i dont want bars are defined in a list, that's why define it one by one in the command will be too large – Paul Damián Jiménez Nuño Sep 18 '15 at 13:52