Detection and styling of multiple functions in Mathematica's Plot

后端 未结 2 1925
盖世英雄少女心
盖世英雄少女心 2021-02-13 18:31

This question started me thinking about how Mathematica detects multiple functions being plotted. I find that I really do not understand the process.

Consider:

2条回答
  •  隐瞒了意图╮
    2021-02-13 19:06

    It's not that difficult to imagine a process which results in this output. I don't have additional proof that this is indeed what happens, but it is reasonable to assume that Plot loops through the list of functions that were passed to it, and associates a style with each. Then it proceeds to evaluate each of them after setting a value to the plot variable. Normally each "function" (element in the list passed to Plot) would return a real number. However, since version 6, Mathematica can handle those that return lists of numbers too, with the flaw that it uses the same styling for the complete list. Version 5 would throw an error for functions that returned lists.

提交回复
热议问题