[IPython-user] Setting the linewidth with Gnuplot2
Andrea Riciputi
ariciputi at pito.com
Thu Sep 30 08:33:13 CDT 2004
Here are my settings, suggested by Fernando some time ago. At the
beginning of my own plot library, I declare the following variable:
import IPython.GnuplotRuntime as GP
...
gp_reset = """
#... a lot of gnuplot stuff
# new linestyles (access as 'linestyle N' or 'ls N' in <with='lines ls
N'>)
set style line 1 lt -1 lw 1 pt 10 ps 1.8
set style line 2 lt 1 lw 1 pt 1 ps 1.8
set style line 3 lt 3 lw 1 pt 4 ps 1.8
set style line 4 lt 2 lw 1 pt 8 ps 1.8
set style line 10 lt 11 lw 1 pt 7 ps 1.8
set style line 11 lt 12 lw 1 pt 5 ps 1.8
set style line 12 lt 10 lw 1 pt 9 ps 1.8
set style line 20 lt 11 lw 2 pt 6 ps 1.8
set style line 21 lt 12 lw 2 pt 4 ps 1.8
set style line 22 lt 10 lw 2 pt 8 ps 1.8
"""%locals() #if you want to use some variables
# and then
gp = GP.gp # live gnuplot instance
gp(gp_reset)
So that when I want to plot something I can do:
gp.plot(GP.Data(x, y, with = "lines ls 20"))
Hope this help,
Andrea.
On 30 Sep 2004, at 14:24, Francesc Alted wrote:
> Hi,
>
> I'm struggling to set a linewidth different than the default when
> plotting
> using Gnuplot2 and IPython. Someone can provide an example?
>
> Thanks!
>
> --
> Francesc Alted
>
> _______________________________________________
> IPython-user mailing list
> IPython-user at scipy.net
> http://scipy.net/mailman/listinfo/ipython-user
>
More information about the IPython-user
mailing list