Plotting horizontal markers on Histogram
 CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

# Thread: Plotting horizontal markers on Histogram

1. Junior Member
Join Date
May 2009
Posts
2

## Plotting horizontal markers on Histogram

I'm using the code mentioned below to plot the horizontal lines on histogram but its not working.

double delta = (va.getRange().getLength()/100);
double mean = computeMean(yAxisValues);
double std = computeStandardDeviation(yAxisValues,mean);
double first = (mean + std);
double second = (mean - std);

//ADDING A MARKER AT MEAN + STD
log.debug("\$\$\$\$\$\$\$\$\$" + sigmalinetype);
if(sigmalinetype == 1 || sigmalinetype == 2 ){

Marker target = new IntervalMarker(first,first+delta);
target.setPaint(Color.red);
target.setLabelAnchor(RectangleAnchor.LEFT);
target.setLabelTextAnchor(TextAnchor.CENTER_LEFT);

}
//ADDING A MARKER AT MEAN - STD
if(sigmalinetype == 1 || sigmalinetype == 3 ){
Marker target1 = new IntervalMarker(second,second+delta);
target1.setPaint(Color.red);
target1.setLabelAnchor(RectangleAnchor.LEFT);
target1.setLabelTextAnchor(TextAnchor.CENTER_LEFT);
}

The same code I have used in scatter chart to plot the markers and its working.Any help in this regard would be gr8ly appreciated.

2. Elite Member Power Poster
Join Date
Aug 1999
Location
UK
Posts
10,163

## Re: Plotting horizontal markers on Histogram

It would probably help if you explained where the Marker and IntervalMarker classes come from and what variable 'plot' is.

The skill of writing is to create a context in which other people can think...
E. Schlossberg

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•