Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » Scatter control (Scatter control scale value display issue)
Scatter control [message #61365] Thu, 02 January 2025 05:06 Go to next message
Pallavi is currently offline  Pallavi
Messages: 1
Registered: January 2025
Junior Member
On y axis scale, scientific notations are shown default (not mentioned in code to show in exponential form). I want to display the value in floating point numbers only, not in exponential form.

In the image attached, the scale values on y axis is say 4E-2. I want to display the value as 0.004.
How can i do it in scatter control.

Thanks,
Re: Scatter control [message #61369 is a reply to message #61365] Thu, 02 January 2025 09:22 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3437
Registered: August 2008
Senior Veteran
Hi Pallavi

Scatter chooses the format, scientific or not, that gives the most information about the number within the available space.
If this doesn't work for you, you can always use the cbModifFormatY() callback. For example this will display numbers to three decimal places:

myScatter.cbModifFormatY = [](String& ret, int, double num) {ret = Format("%.3f", num);};


Best regards
Iñaki
Re: Scatter control [message #61370 is a reply to message #61369] Thu, 02 January 2025 09:26 Go to previous message
koldo is currently offline  koldo
Messages: 3437
Registered: August 2008
Senior Veteran
Hi Pallavi

I have just uploaded a sample of this in examples/ScatterDraw_demo_cl.


Best regards
Iñaki
Previous Topic: Visualize 3d function with SurfaceCtrl
Next Topic: Request for adding GraphCtrl to UppHub
Goto Forum:
  


Current Time: Thu Jul 03 14:40:42 CEST 2025

Total time taken to generate the page: 0.03917 seconds