Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default use stock plot to draw point estimation with confidence interval

Dear All,

I am trying to use stock plot to draw point estimation with confidence
interval. When number of groups are more than 2, it works. But when
number of groups is 2, it doesn't work. Could you check the following
code and help me figure out how can I solve this problem?

Thanks

John



Option Explicit
Option Base 1


'g1 g2
'-9.650714359 -10.30660583
'-5.701064 -6.117369
'-1.751413641 -1.928132172


Sub DrawConf()
Dim confIntChart1 As ChartObject
Dim i, j As Integer

Application.ScreenUpdating = False

Set confIntChart1 = ActiveSheet.ChartObjects.Add(Left:=Cells(1,
5).Left, Top:=Cells(1, 5).Top, _
Width:=Range("A3:E18").Width, Height:=Range("A3:E18").Height)

With confIntChart1
.Chart.SetSourceData Source:=Range(Cells(1, 1), Cells(4, 2))
.Chart.ChartType = xlStockHLC
.Chart.Legend.Delete
.Chart.Axes(xlValue).MajorGridlines.Delete
With .Chart.SeriesCollection(3)
.MarkerStyle = -4115
.MarkerForegroundColor = 1
End With
With .Chart.SeriesCollection(2)
.MarkerStyle = 8
.MarkerForegroundColor = 1
.MarkerBackgroundColor = 1
End With
With .Chart.SeriesCollection(1)
.MarkerStyle = -4115
.MarkerForegroundColor = 1
End With
End With

Application.ScreenUpdating = True
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default use stock plot to draw point estimation with confidence interval


try

If ActiveChart.SeriesCollection.Count = 3 Then
With .Chart.SeriesCollection(3)
* * * * * * .MarkerStyle = -4115
* * * * * * .MarkerForegroundColor = 1
* * * * End With
End If



On Dec 11, 8:47*am, John Smith wrote:
Dear All,

I am trying to use stock plot to draw point estimation with confidence
interval. When number of groups are more than 2, it works. But when
number of groups is 2, it doesn't work. Could you check the following
code and help me figure out how can I solve this problem?

Thanks

John

Option Explicit
Option Base 1

'g1 g2
'-9.650714359 * *-10.30660583
'-5.701064 * -6.117369
'-1.751413641 * *-1.928132172

Sub DrawConf()
* * Dim confIntChart1 As ChartObject
* * Dim i, j As Integer

* * Application.ScreenUpdating = False

* * Set confIntChart1 = ActiveSheet.ChartObjects.Add(Left:=Cells(1,
5).Left, Top:=Cells(1, 5).Top, _
* * * * Width:=Range("A3:E18").Width, Height:=Range("A3:E18")..Height)

* * With confIntChart1
* * * * .Chart.SetSourceData Source:=Range(Cells(1, 1), Cells(4, 2))
* * * * .Chart.ChartType = xlStockHLC
* * * * .Chart.Legend.Delete
* * * * .Chart.Axes(xlValue).MajorGridlines.Delete
* * * * With .Chart.SeriesCollection(3)
* * * * * * .MarkerStyle = -4115
* * * * * * .MarkerForegroundColor = 1
* * * * End With
* * * * With .Chart.SeriesCollection(2)
* * * * * * .MarkerStyle = 8
* * * * * * .MarkerForegroundColor = 1
* * * * * * .MarkerBackgroundColor = 1
* * * * End With
* * * * With .Chart.SeriesCollection(1)
* * * * * * .MarkerStyle = -4115
* * * * * * .MarkerForegroundColor = 1
* * * * End With
* * End With

* * Application.ScreenUpdating = True
End Sub


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use stacked line with markers plot to draw point estimationand confidence interval John Smith[_8_] Charts and Charting in Excel 0 December 12th 11 04:37 PM
use stock plot to draw point estimation with confidence interval John Smith[_8_] Charts and Charting in Excel 0 December 11th 11 02:48 PM
confidence limit/interval Mai-Britt Excel Worksheet Functions 5 December 5th 07 08:05 PM
Confidence Interval cwbecker Excel Worksheet Functions 1 June 29th 06 09:29 PM
How to plot categorical data to show confidence interval? Question... Excel Discussion (Misc queries) 0 April 26th 06 05:28 AM


All times are GMT +1. The time now is 07:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"