Yeah, just yesterday I realized that it's probably better to launch
then notebook just with

ipython notebook

and then just have a cell that initializes things properly (if
needed), so for plotting I use:

%pylab inline

Ondrej

On Mon, Jun 17, 2013 at 3:31 PM, Stefan Krastanov
<krastanov.ste...@gmail.com> wrote:
> Indeed, the example notebooks assume that certain setup was performed.
> I guess it is a leftover from before I learned that it is an ipython
> antipattern.
>
> On 17 June 2013 22:49, Ondřej Čertík <ondrej.cer...@gmail.com> wrote:
>> Hi Stefan,
>>
>> This is awesome, thanks a lot! I tested your notebook, it works great.
>> As far as the
>>
>> examples/beginner/plot_colors.ipynb
>>
>> goes, I had to add the following two lines into the first cell:
>>
>> from sympy import sin, var, cos, pi, sqrt
>> var("x y")
>>
>> I guess it was assumed it would do this automatically somehow. But
>> then things work excellent as well.
>>
>> Anyway, thanks, this will get me going.
>>
>> On Mon, Jun 17, 2013 at 1:57 PM, Stefan Krastanov
>> <krastanov.ste...@gmail.com> wrote:
>>> And by the way, as you mentioned, the docs for the plotting module can
>>> indeed be better.
>>>
>>> On 17 June 2013 21:56, Stefan Krastanov <krastanov.ste...@gmail.com> wrote:
>>>> I answer your question in the attached notebook. But you should really
>>>> check the 4 or 5 `example/beginner/plot*` ipython notebooks as they
>>>> show much nicer examples (and some nice fancy options).
>>>>
>>>> On 17 June 2013 21:13, Stefan Krastanov <krastanov.ste...@gmail.com> wrote:
>>>>> I will write a more complete answer soon, but in the meantime you can
>>>>> check the `examples` folder. In the docs for the plotting module
>>>>> search for "aesthetics".
>>>>>
>>>>> On 17 June 2013 21:00, Ondřej Čertík <ondrej.cer...@gmail.com> wrote:
>>>>>> On Mon, Jun 17, 2013 at 12:58 PM, Ondřej Čertík 
>>>>>> <ondrej.cer...@gmail.com> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Here is one of my notebooks (work in progress) for the sympy tutorial:
>>>>>>>
>>>>>>> http://nbviewer.ipython.org/5799312
>>>>>>>
>>>>>>> How can I set line colors in the plot at the prompt [8]? I didn't find
>>>>>>> it in the docs:
>>>>>>>
>>>>>>> http://docs.sympy.org/dev/modules/plotting.html
>>>>>>>
>>>>>>> I assume I should save it to a variable "p" and then do something like
>>>>>>>
>>>>>>> p[0].line_color = "red"
>>>>>>>
>>>>>>> Except I didn't figure out the exact syntax yet.
>>>>>>
>>>>>> Also, is it possible to create a legend?
>>>>>>
>>>>>> I'll probably just use matplotlib for the more advanced plots, but I
>>>>>> want to show the best we can do so far with plotting. Or maybe there
>>>>>> is some way to call matplotlib commands on the plot? That might be the
>>>>>> best solution.
>>>>>>
>>>>>> Ondrej
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "sympy" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>>> an email to sympy+unsubscr...@googlegroups.com.
>>>>>> To post to this group, send email to sympy@googlegroups.com.
>>>>>> Visit this group at http://groups.google.com/group/sympy.
>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>>
>>>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "sympy" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to sympy+unsubscr...@googlegroups.com.
>>> To post to this group, send email to sympy@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/sympy.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "sympy" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sympy+unsubscr...@googlegroups.com.
>> To post to this group, send email to sympy@googlegroups.com.
>> Visit this group at http://groups.google.com/group/sympy.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to