Skip to content

[#1029] Allow for custom plot line color and style #3052

Open
SiboVG wants to merge 15 commits into
openrocket:unstablefrom
SiboVG:issue-1029
Open

[#1029] Allow for custom plot line color and style #3052
SiboVG wants to merge 15 commits into
openrocket:unstablefrom
SiboVG:issue-1029

Conversation

@SiboVG
Copy link
Copy Markdown
Member

@SiboVG SiboVG commented Mar 14, 2026

Fixes #1029. You can now configure the plot line color and style for each data type. These settings are stored in the .ork file.

image image

@neilweinstock
Copy link
Copy Markdown
Contributor

When I just tried this out, the plot dialog opened too small to fit all the new UI:
image

The plot legend gets a bit wonky with different line styles but I think it's probably OK:
image

I tend to think that this would make more sense as a global app preference rather than a per-rocket setting. Would be interested in hearing others' opinions.

@JoePfeiffer
Copy link
Copy Markdown
Contributor

Which plots I want to see depend on what I'm trying to figure out for a particular rocket. My guess is it's more useful as it is here.

@SiboVG
Copy link
Copy Markdown
Member Author

SiboVG commented Apr 5, 2026

When I just tried this out, the plot dialog opened too small to fit all the new UI:
image

I don't think that's a result of this PR. I've noticed it already several weeks before this PR. I haven't looked into fixing it yet.

I tend to think that this would make more sense as a global app preference rather than a per-rocket setting. Would be interested in hearing others' opinions.

I believe there are cases where you do want per-sim specific appearances, for instance if you want Plot A to use a solid line for altitude, but in Plot B a dashed line. But I also like the idea of a global app preference. Color-blind users could then customize the colors to their needs.

Would a "Set as default" button in the plot appearance row achieve the best of both worlds?

@neilweinstock
Copy link
Copy Markdown
Contributor

Would a "Set as default" button in the plot appearance row achieve the best of both worlds?

Probably, yeah. So in that case, when would you save the settings with the ORK file? Only when they're different from default?

@JoePfeiffer
Copy link
Copy Markdown
Contributor

@SiboVG do you want to add the "set as default" or should we merge it now?

@SiboVG
Copy link
Copy Markdown
Member Author

SiboVG commented Apr 7, 2026

Would a "Set as default" button in the plot appearance row achieve the best of both worlds?

Probably, yeah. So in that case, when would you save the settings with the ORK file? Only when they're different from default?

Yes, something like that.

@SiboVG
Copy link
Copy Markdown
Member Author

SiboVG commented Apr 7, 2026

@SiboVG do you want to add the "set as default" or should we merge it now?

I'll take a look at it this week.

SiboVG added 3 commits April 8, 2026 01:46
When a new plot parameter is added, it uses the default appearance. when you load a file that already contains plot appearances, but they have not yet been customized (same value as the factory default), then replace that with the new user application default
@SiboVG
Copy link
Copy Markdown
Member Author

SiboVG commented Apr 8, 2026

Done. I added a "Set as default" and "Reset to factory default" button. To not clutter the UI, I used icon buttons (this SVG icon replacement is really paying off).

Screen.Recording.2026-04-08.at.02.17.57.mp4

I do still want to change SwingPreferences to not use type.getName(), but type.getSaveKey(). But for that , #3109 needs to get merged first.

@neilweinstock
Copy link
Copy Markdown
Contributor

What are the tooltips on those two new buttons?

@SiboVG
Copy link
Copy Markdown
Member Author

SiboVG commented Apr 8, 2026

What are the tooltips on those two new buttons?

For set as default:

Set as default
Save the current color and line style as the application default for this data type

For reset to factory default:

Reset to factory default
Revert the color and line style to their built-in defaults for this plot

@neilweinstock
Copy link
Copy Markdown
Contributor

That sounds good. I'm not sure I'm totally on board with the choics of icons for those buttons, but that's a good enough starting point (the "save as default" button looks like a bookmark icon, which doesn't map to the function in my mind... is that a common usage?)

@SiboVG
Copy link
Copy Markdown
Member Author

SiboVG commented Apr 8, 2026

That sounds good. I'm not sure I'm totally on board with the choics of icons for those buttons, but that's a good enough starting point (the "save as default" button looks like a bookmark icon, which doesn't map to the function in my mind... is that a common usage?)

There really is no standard icon for this functionality. This is the closest I could find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New feature request: Ability to edit plot appearance

3 participants