<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Setting the number of labels does help but it doesn't give me the discrete values on the scalar bar. &nbsp; &nbsp;For example, if I have three discrete values .4, .5, 1.25. &nbsp; The scalar bar displays .4 .825, 1.25. &nbsp; &nbsp;The .825 appears to be just average of the minimum and the maximum for the three value case.<div><br></div><div>Looking the source code for vtkScalarBarActor::AllocateAndSizeLabels(...), it looks like the interior values of scalar bar are a function of &nbsp;the range and the number of labels. &nbsp;There is no way to specify the discrete values. &nbsp; &nbsp;It looks like I will have to subclass vtkScalarBarActor and overload AllocateAndSizeLabels. &nbsp;Fortunately, it is a virtual method!</div><div><br></div><div>&nbsp; &nbsp;-- Karl</div><div><br><div><div>On Feb 23, 2012, at 2:33 AM, Jothybasu Selvaraj wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">You could do that by<br><br>//For 10 labels<br><span style="color:rgb(0,128,0)">scalarBar-&gt;SetMaximumNumberOfColors(10);<br></span><span style="color:#008000">scalarBar-&gt;SetNumberOfLabels(10);</span><br>
<br>Jothy<br><br><div class="gmail_quote">On Thu, Feb 23, 2012 at 12:10 AM, Karl Merkley <span dir="ltr">&lt;<a href="mailto:karl@elemtech.com">karl@elemtech.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I have a set of discrete values (thicknesses) that I want to describe with a scalar bar. &nbsp; Each color has exactly one value associated with it. &nbsp; When I set up my scalar bar it has a range defined by each color. &nbsp; &nbsp;Is there a way to get a single label drawn at the center of the color range instead of labels at the tops and bottoms of each range?<br>

<br>
 &nbsp;Thanks,<br>
 &nbsp; &nbsp; Karl<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</div>
_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>---------------------------</div><div>Karl Merkley, Ph.D.</div><div><br></div><div><span class="Apple-style-span" style="font-size: medium; ">Elemental Technologies, Inc.</span><span class="Apple-style-span" style="font-size: medium; "><br></span><span class="Apple-style-span" style="font-size: medium; ">Computational Simulation Software, LLC</span><span class="Apple-style-span" style="font-size: medium; "><br></span><span class="Apple-style-span" style="font-size: medium; "><a href="http://www.csimsoft.com/">www.csimsoft.com</a></span><span class="Apple-style-span" style="font-size: medium; "><br></span><span class="Apple-style-span" style="font-size: medium; "><br></span><span class="Apple-style-span" style="font-size: medium; ">Office: &nbsp;1-801-756-1972, ext 1</span></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>