Skip to content
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

Add support for negative values #153

Closed
wants to merge 5 commits into from

Conversation

gsmecher
Copy link
Contributor

Adds support for negative values. Should clear up #53 and #22.

This is a quick and possibly rough implementation - comments welcome.

A couple of drive-by changes are notable:

- Data arrays are now initialized with NaNs, so we don't assume 0s. This
  used to be harmless while data was nonnegative, but if a function goes
  negative while initialized-with-0 data is still in the data buffer it
  becomes visibly wrong without this fix.
- The standard math library (-lm) is now used. This could be finessed
  with biased truncation, but this is clearer.

Data is still plotted vertically "up from negative infinity", which is
perhaps a little unusual. This is simpler than tracking where the axes
should be drawn, and still produces a legible result with axes that
don't jump around as the extents of the data change.
Copy link
Collaborator

@hartwork hartwork left a comment

Choose a reason for hiding this comment

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

@gsmecher I haven't looked at this in detail yet but I should share that @tenox7 and @edgar-bonet and I are in the process of finishing release 1.6.0 based off branch development not master, ticket #134 has a few details more, we're not far from the finish line (..). It is probably best to get 1.6.0 finished and development merged into master first and then we can see together how to transplant this new support for negative numbers, some of it may already by there from #115 but I haven't had a closer look yet what's in here. Happy to do that after 1.6.0.

@gsmecher
Copy link
Contributor Author

@gsmecher I haven't looked at this in detail yet but I should share that @tenox7 and @edgar-bonet and I are in the process of finishing release 1.6.0 based off branch development not master, ticket #134 has a few details more, we're not far from the finish line (..). It is probably best to get 1.6.0 finished and development merged into master first and then we can see together how to transplant this new support for negative numbers, some of it may already by there from #115 but I haven't had a closer look yet what's in here. Happy to do that after 1.6.0.

Not a problem - this was a quick first run through negative-value support. If you get there first, great - otherwise I'll look at merging or rewriting post-1.6.0.

@hartwork
Copy link
Collaborator

@gsmecher with #155 merged, master would now be ready for a re-evaluation of support for negative values.

@tenox7
Copy link
Owner

tenox7 commented Dec 27, 2023

It says there are conflicts in Makefile and ttyplot.c

@hartwork
Copy link
Collaborator

@gsmecher with #155 merged, master would now be ready for a re-evaluation of support for negative values.

@gsmecher we haven't heard from you for 3+ weeks now. Are you still interested in this pull request?

@gsmecher
Copy link
Contributor Author

gsmecher commented Jan 19, 2024 via email

@hartwork hartwork added the enhancement New feature or request label Jan 19, 2024
@gsmecher
Copy link
Contributor Author

Closed in favour of #169.

@gsmecher gsmecher closed this Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants