Question: I am new to `python` and I was trying to use DataFrames to see if I can achieve the desired output

This is the input:

```
            Data = {
            NAME = Jack
            AGE  = 25
            CITY = NYC
        }
            Data = {
            NAME = Jill
            AGE =  35
            CITY = Boston
        }

```

and it keeps repeating in the same sequence. I tried to do with `transpose`. This is the output I need:

```
   NAME AGE CITY
Jack  25  NYC

Jill  35  Boston

```

But I don't think this is the right approach. Please can you provide some guidance?

Answer: 
Vertical window is set by `ylim` option. I recommend to also use some explicit limits for `x`, the default -10 to 10 is not necessarily best for you. And I do recommend reading [the page on SymPy plotting](https://docs.sympy.org/latest/modules/plotting.html).

Color is set by `line_color` option. Different colors require different calls to `plot`, but those can be combined. Example:

```
p = plot(y, (x, -5, 5), ylim=(-20, 20), line_color='b', show=False)
p.extend(plot(yp, (x, -5, 5), ylim=(-20, 20), line_color='r', show=False))
p.show()

```

results in

[![combined](https://i.stack.imgur.com/t9jb4.png)](https://i.stack.imgur.com/t9jb4.png)

The function reuse is easy: 

```
def derivative(a, b, c, d):
    y = f1(a, b, c, d)
    yprime = y.diff(x)
    return yprime

```

Aside: what happens if we try `line_color=['b', 'r']`, as in `plot(y, yp, ylim=(-20, 20), line_color=['b', 'r'])`? Funny stuff happens:

[![funny](https://i.stack.imgur.com/kq9xz.png)](https://i.stack.imgur.com/kq9xz.png)
I use the following function to get colors that are "far" from each other in a general way. The 2396745 is pretty arbitrary, and defines how far apart the colors are. It seems to give me good results.

```
def cmap_ints(i):
    return "#"+hex(((int(i)+1)*2396745)%(256**3))[2:].rjust(6,"0")

```

Usage:

```
import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0,1,100)
y1 = 3*x + 4
y2 = 2*x - 5
plt.plot(x,y1,c=cmap_ints(1))
plt.plot(x,y2,c=cmap_ints(2))

```