-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Plotting a Table requires explicit Evaluate #150
Comments
This problem is caused by the definition on line 140 in mathics/builtin/plot.py, changing it to |
Is this actually a bug? https://reference.wolfram.com/mathematica/ref/Table.html gives an example of |
The problem is there even if |
I did a bit of research on this - this might be obvious to people who are more familiar with Mathematica than me, but this question on Mathematica Stack Exchange explains that If I understand correctly, what this means for Mathics's implementation is that Plot should be able to plot functions that return a list of points. edit - also, if we're asked to plot something we can't handle, it feels like we should issue a message rather than just return an empty plot! |
From what I've see at the moment Plot in mathics does not handle function arguments, that is
does not give the expected result but I think it's a different issue respect to the one at hand. For this issue, mathics is able to plot lists of functions of the plot variable (say x) but cannot do this if such a list is "hidden" in a variable. Using Evaluate on the list before plotting is not a good solution because you can get the "wrong" result (i.e. different from mathematica) if you do something like
This would plot 2 constant functions at 25 and 125 while in mathematica
gives the expected plots since the "x" in fs is treated like a dummy variable. So |
This sounds like a pretty serious problem. Could you file a separate issue for this? I'm not seeing this on current master, so it'd be good to know which git SHA you're running on and the version of Python/SymPy/etc you're using. Thanks! |
Sorry, there was a conflict of definitions in the notebook I was using, stopping the server and restarting it does not reset the definitions (dunno if this is normal) and sometimes I forget to give a
work, sorry for the false alarm, the rest is confirmed though. |
Fixes behaviour of plot with defined symbols (addresses #150)
Does not work unless used with
Evaluate
. e.g.Reported here.
The text was updated successfully, but these errors were encountered: