Discussion Overview
The discussion revolves around the possibility of plotting domain-dependent functions using Python's matplotlib library. Participants explore how to represent functions that change definitions based on the input domain, including specific examples and code implementations.
Discussion Character
- Exploratory
- Technical explanation
- Mathematical reasoning
Main Points Raised
- Some participants inquire whether matplotlib can plot a function that varies with its domain, providing examples of such functions.
- There is a suggestion that matplotlib can plot points regardless of how they are calculated, leading to the question of how to generate the necessary y-values for a domain-dependent function.
- A participant describes a method using NumPy's linspace() to create separate arrays for different domains and then plot them together.
- Another participant requests clarification on how to create a continuous graph from these separate arrays and whether they should be concatenated.
- Multiple participants provide code snippets demonstrating different approaches to plotting these functions, including handling discontinuities and using lambda functions for defining piecewise functions.
- Some participants express uncertainty about how to best represent discontinuities in the graph.
- There are suggestions for improving the representation of discontinuities by plotting different series for each domain and using markers to indicate open and closed intervals.
Areas of Agreement / Disagreement
Participants generally agree that it is possible to plot domain-dependent functions using matplotlib, but there are multiple approaches discussed, and no single method is universally accepted as the best. The discussion remains unresolved regarding the optimal way to handle discontinuities in the plots.
Contextual Notes
Some participants note limitations in their understanding of how to implement certain features in matplotlib, particularly regarding the representation of discontinuities and the concatenation of data arrays.