Opened 11 years ago

Closed 8 years ago

Last modified 7 years ago

#2696 closed enhancement (wontfix)

Display enhancement of very large numbers on vertical axis

Reported by: massimo ceraolo Owned by: Adeel Asghar
Priority: normal Milestone:
Component: OMEdit Version: trunk
Keywords: Cc:

Description (last modified by massimo ceraolo)

I don't know whether there is already a ticket on this.
I could find one.

In OMEdit, when plots are made of very large (or very small) variables, the plot display is far from optimal.
Consider for instance the example in the plot supplied.
The shown variable that ranges between -800.000 and +800.000. The numbers on the vertical axis are visually too large: 8 characters for the first and 7 for the second one.

This is suboptimal because it uses too much of the valuable plot space.
To me, the optimal solution might be either to write the numbers on the axes between -800 and 800 and adding somewhere in the vertical axis "*103" or -8 and 8 and label the axis with "*105"
I mean, when numbers are very large or very small, they should be displayed in scientific or engineering format, but the corresponding power of ten is to be put once on the axis.
In case units of measure are used, engineering prefixes (e.g. m for *10-3, k for *103, M for *106, ...) should be used

Attachments (3)

plot.png (5.0 KB ) - added by massimo ceraolo 11 years ago.
1.png (4.1 KB ) - added by massimo ceraolo 11 years ago.
2.png (4.1 KB ) - added by massimo ceraolo 11 years ago.

Download all attachments as: .zip

Change History (15)

by massimo ceraolo, 11 years ago

Attachment: plot.png added

comment:1 by Adeel Asghar, 11 years ago

Status: newaccepted

Following number formats are supported by Qt,

Format Meaning

e format as [-]9.9e[+]999 E format as [-]9.9E[+]999

f format as [-]9.9
g use e or f format, whichever is the most concise
G use E or f format, whichever is the most concise
http://qt-project.org/doc/qt-4.8/qstring.html#argument-formats

Plots use 'g' with precision value of 6. So the numbers in range of 0 to 999999 will be displayed as it is. I have changed the precision value to 5 which means numbers like 800000 will be displayed like this 8e+05.

See r20678.

Version 0, edited 11 years ago by Adeel Asghar (next)

in reply to:  1 comment:2 by massimo ceraolo, 11 years ago

Adeel,
"g" format is fantastic, and I use in my plotting programs.
Change precision from 6 to 5 is a good step forward.

In addition, instead of having the "E" part of the number displayed on all numbers on the axis I would extract it and display only once.
I know that this requires work, and not all do this (neither Dymola programmers. But the final result is by far clearer and more compact. I will attach, just for more clarity, two png's of a plotting program I made (using Qt 5.2.1). In the first, power of ten is used; in the second user has chosen "autolabel known variables", and the plotting program interprets all variables starting with "t" as time and with "v" as voltage.

Regards

by massimo ceraolo, 11 years ago

Attachment: 1.png added

by massimo ceraolo, 11 years ago

Attachment: 2.png added

comment:3 by Adeel Asghar, 11 years ago

I am not sure if the plotting tool (Qwt - http://qwt.sourceforge.net/index.html) we are using really support this or not. I have to investigate it.

comment:4 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:5 by massimo ceraolo, 10 years ago

Description: modified (diff)

comment:6 by Martin Sjölund, 10 years ago

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:7 by massimo ceraolo, 10 years ago

Description: modified (diff)

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:9 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:10 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:11 by Adeel Asghar, 8 years ago

Resolution: wontfix
Status: acceptedclosed

It is difficult to achieve this using Qwt.

comment:12 by Martin Sjölund, 7 years ago

Milestone: 1.10.0

Milestone deleted

Note: See TracTickets for help on using tickets.