Skip to content

Upgrade Serial Plotter #5443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 18, 2016
Merged

Upgrade Serial Plotter #5443

merged 2 commits into from
Oct 18, 2016

Conversation

duff2013
Copy link
Contributor

@duff2013 duff2013 commented Oct 4, 2016

This adds a x-axis and labels, grid lines, more y-axis ticks and moves Serial Baud Rate combo box to the other side to reflect the look of the Serial Monitor. It also scales right when the window is scaled.
Before:
screen shot 2016-10-03 at 5 05 28 pm

After:
screen shot 2016-10-03 at 7 41 11 pm

Copy link
Member

@facchinm facchinm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Math used to generate extra ticks is quite complicated but looks ok

@duff2013
Copy link
Contributor Author

duff2013 commented Oct 17, 2016

I hope Arduino devs can merge this since it makes the Serial Plotter much more useful. If there are issues with the way I did things let me know?

Copy link
Member

@cmaglie cmaglie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, I reviewed it and is ok overall, I just want to let the theme.txt file control the missing colors of the graph (as indicated in the inline comments), may you make this change?

private final Font font;
private final Color bgColor;
private final Color gridColor = new Color(245, 245, 245, 245);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This color should be put into the theme and retrieved with something like Theme.getColor("plotting.gridcolor")

@@ -132,16 +134,58 @@ public void paintComponent(Graphics g1) {
Rectangle2D fRect = fm.getStringBounds(String.valueOf(tick), g);
xOffset = Math.max(xOffset, (int) fRect.getWidth() + 15);

g.setColor(Color.BLACK);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And probably this one too, even if it wasn't present before, it may be encoded as plotting.axiscolor

@cmaglie cmaglie self-assigned this Oct 17, 2016
@cmaglie cmaglie added this to the Release 1.6.13 milestone Oct 17, 2016
@duff2013
Copy link
Contributor Author

Even better, I like using the theme.txt for the grid colors, still trying to get handle on how everything fits together. I'll try to make this work.

@cmaglie cmaglie merged commit 9a3881e into arduino:master Oct 18, 2016
@cmaglie
Copy link
Member

cmaglie commented Oct 18, 2016

Thank you!

@per1234 per1234 added the SerialPlotter Tools > Serial Plotter label Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SerialPlotter Tools > Serial Plotter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants