Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#99 closed defect (fixed)

most recent curves don't always plot on top in apps

Reported by: Kevin Milner Owned by: Kevin Milner
Priority: major Milestone: OpenSHA 1.1
Component: sha Version:
Keywords: Cc:

Description

In reproducing figures from hazard curve tutorials, I noticed that curves that are added later in the calculation are not necessarily on top. For the tutorial, the grey curves should be on bottom, blue fractiles above that, and red mean curve on top.

Attachments (2)

curves.png (20.6 KB) - added by Kevin Milner 13 years ago.
plot showing curve order
curves_order_fixed.png (21.2 KB) - added by Kevin Milner 13 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 13 years ago by Ned Field

I always been annoyed by this (seems like the one you want to see is always underneath, but then again, you only notice the problem when it is a problem). Seems like the best would be to allow the user to change the ordering.

comment:2 Changed 13 years ago by Kevin Milner

or we just simply could enforce that the most recent is always on top, oldest always on bottom. maybe plot prefs could have up/down buttons for switching the order.

comment:3 Changed 13 years ago by Ned Field

That would be good.

Changed 13 years ago by Kevin Milner

Attachment: curves.png added

plot showing curve order

comment:4 Changed 13 years ago by Kevin Milner

It looks like it's currently done in reverse order. The first curve is always on top, last curve always on bottom. I think this should be flipped. See the file I just attached:

plot showing curve order

In this example, here's the calculation order:

  1. Red - shown on top
  2. Blue
  3. Green
  4. Brown (or whatever that color is) - shown on bottom

I'm going to reverse that now, unless anyone objects

Changed 13 years ago by Kevin Milner

Attachment: curves_order_fixed.png added

comment:5 Changed 13 years ago by Kevin Milner

Resolution: fixed
Status: newclosed

done in [7293]...pretty simple fix actually. Just had to call plot.setDatasetRenderingOrder(DatasetRenderingOrder?.FORWARD);

Now a plot, calculated in the same order, appears as such:


Notice that the first curve (red) is now on bottom.

comment:6 Changed 13 years ago by Kevin Milner

I added this as an option in the plot preferences control panel in [7941], as part of the work for #302.

Note: See TracTickets for help on using tickets.