Line colors and styles

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Line colors and styles

Steven N. Harp
Octave and gnuplot users,
When I use octave and produce graphical output, I view my plots in a
x11 window and I print out my plots in ps form. gnuplot uses different
colors for an x11 window and a ps files and the ps line colors also
have a line style associated with them. I would like to know if there
is a method for getting the same colors, whether a x11 window or ps
file. I suspect that this would require a change in the trm files in
gnuplot. Also is there a method to control the line style for the ps
terminal? Is it possible to get a solid red, blue,cyan etc line when a
postscript terminal is used ?

I guess one last question I have is that if the things I want to do
above are possible in gnuplot, would they be possible in octave.

Thanks

Steve


Reply | Threaded
Open this post in threaded view
|

Line colors and styles

John W. Eaton-6
On 12-Nov-1997, Steven N Harp <[hidden email]> wrote:

| When I use octave and produce graphical output, I view my plots in a
| x11 window and I print out my plots in ps form. gnuplot uses different
| colors for an x11 window and a ps files and the ps line colors also
| have a line style associated with them. I would like to know if there
| is a method for getting the same colors, whether a x11 window or ps
| file. I suspect that this would require a change in the trm files in
| gnuplot. Also is there a method to control the line style for the ps
| terminal? Is it possible to get a solid red, blue,cyan etc line when a
| postscript terminal is used ?
|
| I guess one last question I have is that if the things I want to do
| above are possible in gnuplot, would they be possible in octave.

You don't say what version of gnuplot you are using, but with a recent
3.6beta release, I think you should be able to get what you want using
just

  set terminal postscript color

(for Octave, use `gset' instead of `set').  To get the list of colors
to be the same in gnuplot's X11 window without having to change the
gnuplot sources, you can use the following X resources

  gnuplot*line1Color: green
  gnuplot*line2Color: blue
  gnuplot*line3Color: red
  gnuplot*line4Color: magenta
  gnuplot*line5Color: cyan
  gnuplot*line6Color: yellow
  gnuplot*line7Color: black
  gnuplot*line8Color: orange

(I think I have this right -- if not, it should be close).  I haven't
checked lately, so this problem may have also been fixed in a more
recent gnuplot 3.6beta release.

jwe


Reply | Threaded
Open this post in threaded view
|

Re: Line colors and styles

Andy Meyer
In reply to this post by Steven N. Harp
On Wed, 12 Nov 1997, Steven N Harp wrote:

> Octave and gnuplot users,
> When I use octave and produce graphical output, I view my plots in a
> x11 window and I print out my plots in ps form. gnuplot uses different
> colors for an x11 window and a ps files and the ps line colors also
> have a line style associated with them. I would like to know if there
> is a method for getting the same colors, whether a x11 window or ps
> file. I suspect that this would require a change in the trm files in
> gnuplot. Also is there a method to control the line style for the ps
> terminal? Is it possible to get a solid red, blue,cyan etc line when a
> postscript terminal is used ?
>
> I guess one last question I have is that if the things I want to do
> above are possible in gnuplot, would they be possible in octave.

The answer here is to:
gset postscript solid

Found a great program for viewing the ps plots called gv located at:
 http://wwwthep.physik.uni-mainz.de/~plass/gv/
Much better that ghostscript, easier to use X interface, auto updates,
window zooming, and much more.

>
> Thanks
>
> Steve
>



Andy Meyer
[hidden email]