Opened 10 years ago

Last modified 3 years ago

#2777 new enhancement

Omedit and small plots issues

Reported by: anonymous Owned by: adeas31
Priority: normal Milestone:
Component: OMEdit Version: trunk
Keywords: Cc:

Description

Often the user might want to look at several plots simultaneously.
Then he wants them to be tiny.

Typically, to ease clear small plots, plotting programs reduce the number of numerical labels when pots are small.
Unfortunately OMEdit does not do this: the number of numerical label is fixed.
Therefore when small plots are made labels on the horizontal axis overlap. Labels on the vertical axis do no overlap because a is imposed on the vertical plot size (it cannot be smaller than a rather large limit).
What I suggest is to add a simple algorithm that adapts the number of numerical labels to the actual plot size. So that plots can be smaller than they are now, while still being well readable.
In enclose a file containing an example, created with r20199. The top picture is reasonable. The center picture is too crowded of numerical labels; the bottom one is the worst one.

Attachments (2)

r1plots.pdf (369.6 KB) - added by anonymous 10 years ago.
VarPlot.pdf (84.2 KB) - added by ceraolo 10 years ago.

Download all attachments as: .zip

Change History (17)

Changed 10 years ago by anonymous

comment:1 Changed 10 years ago by sjoelund.se

  • Milestone changed from 1.9.1 to 1.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:2 Changed 10 years ago by ceraolo

It looks like this ticket has been fixed, since in r24023 i cannot see label overlap.
However, resizing is still tricky.
Consider the following code:

model VariableEquations
  parameter Real k = 2;
  Real x(start = 10);
equation
  if time < 0.6 then
    der(x) + k * x * x = 1;
  else
    der(x) - k * x * x = 1;
  end if;
end VariableEquations;

Using this code one can produce the plot shown in the first page of the provided file "varPlot.pdf".

The plot height is the minimum allowed by OMEdit r24023.
Indeed this has still a rather large height.

In my opinion, one should be granted the chance of displaying very small plots, so that he could use several plots to look at simultaneously.
Why it is not possible, for instance, to make the provided plot half the vertical size shown?
Maybe it is just a matter of eliminating some numerical label from the vertical axis.

Just to explain what I mean, in the second page of varPlot.pdf I show three file shots of the same plot, made with a program that manages the quantity of information to be put on the axes, so that he can display even tiny plots without overlapping any label. Indeed the largest plot contains 9 numbers on the horizontal axis, while the mid-one contains 5 and intermediate tic marks; finally the tiniest plot has reduced data on both axes, so that all text is still well visible.

Is it possible to make OMEdit capable of something like this?

BTW I created the plotting program that I used using Qt 5.2 and can share the source code, if requested.

Changed 10 years ago by ceraolo

comment:3 Changed 10 years ago by ceraolo

I've checked today (with r24759) and I saw that the plot created using the "VariableEquations" model above can now be smaller.
So I think the situation has improved.

I've made some further checks and saw the following:

  1. the smallest possible size for a plot in a subwindow (restored-down) depends on the plot contents: this is reasonable since there is the need to avoid labels to overlap
  2. the smallest possible size for a maximised plot, instead, has not the previous limit. When the whole OMEdit window is resized the plot is resized accordingly, a nd can reach the size of a few pixels, with total overlap of labels, grid and curves, so that the curve is not visible anymore.

I think that r24759 behaviour is reasonable except for the legend height that is too tall especially for small plots (see #3194).
In the future I still hope that there will be possible to have not very large axis labels: instead of, let say,

-100,000 -50,000 0 50,000 100,000 150,000

for a variable whose unit is [W], it's better to have

-100 -50 0 50 100 150

as axis labels and [kW] as variable unit.
This will be especially useful for small plot windows.
(I know that I already discussed this in #2696: here I'm just trying to summarise).

comment:4 Changed 10 years ago by sjoelund.se

  • Milestone changed from 1.9.2 to 1.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:5 Changed 9 years ago by sjoelund.se

  • Milestone changed from 1.9.3 to 1.9.4

Moved to new milestone 1.9.4

comment:6 Changed 9 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.5

Milestone pushed to 1.9.5

comment:7 Changed 9 years ago by sjoelund.se

  • Milestone changed from 1.9.5 to 1.10.0

Milestone renamed

comment:8 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.10.0 to 1.11.0

Ticket retargeted after milestone closed

comment:9 Changed 8 years ago by adeas31

  • Milestone changed from 1.11.0 to 1.12.0

Milestone changed to 1.12.0 since 1.11.0 was released.

comment:10 Changed 7 years ago by adeas31

  • Milestone changed from 1.12.0 to 1.13.0

comment:11 Changed 6 years ago by casella

  • Milestone changed from 1.13.0 to 1.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:12 Changed 5 years ago by casella

  • Milestone changed from 1.14.0 to 1.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:13 Changed 4 years ago by casella

  • Milestone changed from 1.16.0 to 1.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:14 Changed 4 years ago by casella

  • Milestone changed from 1.17.0 to 1.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:15 Changed 3 years ago by casella

  • Milestone 1.18.0 deleted

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.