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
Changing to the propper "Plots.jl" names to avoid warnings #316
Conversation
First commit, so I may have done something wrong. Feedback is appreciated. I changed ylabel, ylabel and color to yguide, xguide and seriescolor in accordance with the error message I got from doing an impulse-plot, copied below. I also changed color to seriescolor for the lsimplot function. This is done to avoid unnecessary warnings: ```julia Warning: Attribute alias `color` detected in the user recipe defined for the signature (::ControlSystems.Impulseplot). To ensure expected behavior it is recommended to use the default attribute `seriescolor`. └ @ Plots C:\Users\user\.julia\packages\Plots\ViMfq\src\pipeline.jl:15 ┌ Warning: Attribute alias `ylabel` detected in the user recipe defined for the signature (::ControlSystems.Impulseplot). To ensure expected behavior it is recommended to use the default attribute `yguide`. └ @ Plots C:\Users\user\.julia\packages\Plots\ViMfq\src\pipeline.jl:15 ┌ Warning: Attribute alias `xlabel` detected in the user recipe defined for the signature (::ControlSystems.Impulseplot). To ensure expected behavior it is recommended to use the default attribute `xguide`. └ @ Plots C:\Users\user\.julia\packages\Plots\ViMfq\src\pipeline.jl:15 ```
Nice, thanks :) bodeplot(sys, c=:blue) We've had problems with this before, that depending on what keyword we used in the plot recipe the results would be different when the user provided these magic keywords |
I copy-pasted the file I edited in the PR into my own package (Is that a legit move? It seems to work at least, ehe...), and ran both bodeplot and impulseplot with keywords c and color, everything works fine. No errors and colors as expected However, when I run this code L = 1.5
R = 1
C = 0.8
num = [1.0]
den = [L*C, R*C, 1]
TF = tf(num, den)
#mag, phase, w = bode(TF)
bodeplot(TF, color=:red) I get 456 lines printed into REPL (in VSCode) saying A third, unrelated thing: how do I know what impulse my model is subjected to in an impulseplot, and how do I edit it? I saw nothing on it in the docs for impulseplot, it only mentions the |
Alright great! The The impulse is such that it has unit area but the shortest possible time. For discrete systems this means one sample period, for continuous systems this means a Dirac delta function. You can not change this, but you can provide arbitrary inputs to the function ControlSystems.jl/src/timeresp.jl Line 41 in d183cb1
|
That is a shame, the LaTeX looks great. With the ployly backend it is just un-parsed latex, so that is also not great.
I think I will add this to the doc-string, if you are okay with me using your words? Ofc, you will probably have the final say on it anyways, so you can be a filter if I write something stupid/inaccurate. I will try to say no more than you did.
I have to admit, there is a lot I don't understand. I am a third semester engineering student who happens to prefer Julia to MatLab and Simulink if I can (due to cost, and Julia syntax/comunity/speed are all so great), so I am checking out alternatives. I had pretty much no idea what a control-system, a transfer-function or the laplace-domain were a few short weeks ago (I still don't really KNOW what the laplace-domain is, but it sure is nice for math!). I think I have to learn more before I can take full use of your package, which really looks like it can do a lot of nice things. Good job, and thank you for your nice and full answers 😄 (Is this where I close the issue?) |
Please don't close, it's a PR ;) I'll merge it once all tests have passed. And yes, feel free to add to the docstring of |
So I have only changed "color" into "seriescolor" and "x/ylabel" into "x/yguide" where I could find them, inside the call to the
@series
macros. This is my first pull-request and commit, and so any feedback is appreciated. I don't really know what I am doing, but I hope and believe that I fixed it right ^_^