LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-09-2017, 03:24 PM   #1
gpm
LQ Newbie
 
Registered: Jul 2017
Posts: 2

Rep: Reputation: Disabled
PGPLOT background color


My plots show in a window with only black or blue background color in the plot window. I'm using gfortran and device type /XWINDOW or /XSERVE. The only background color option I've found is an environment variable PGPLOT_BACKGROUND. Is there another way to change the background color of the window in which the plot is drawn? I am working with WSL (windows subsystem for linux) but DISLIN works well.
 
Old 07-09-2017, 07:53 PM   #2
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Does PGSCRN() work on your system? http://www.astro.caltech.edu/~tjp/pg...es.html#PGSCRN

Using the example from the docs and adding "CALL PGSCRN(0, 'navy', IER)" yields a white plot on a navy background on my Debian box. http://www.astro.caltech.edu/~tjp/pgplot/chapter2.html
Code:
      PROGRAM SIMPLE
      INTEGER I, IER, PGBEG
      REAL XR(100), YR(100)
      REAL XS(5), YS(5)
      DATA XS/1.,2.,3.,4.,5./
      DATA YS/1.,4.,9.,16.,25./
      IER = PGBEG(0,'/XWIN',1,1)
      IF (IER.NE.1) STOP
      CALL PGSCRN(0, 'navy', IER)
      CALL PGENV(0.,10.,0.,20.,0,1)
      CALL PGLAB('(x)', '(y)', 'A Simple Graph')
      CALL PGPT(5,XS,YS,9)
      DO 10 I=1,60
          XR(I) = 0.1*I
          YR(I) = XR(I)**2
   10 CONTINUE
      CALL PGLINE(60,XR,YR)
      CALL PGEND
      END
 
Old 07-11-2017, 09:49 AM   #3
gpm
LQ Newbie
 
Registered: Jul 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
It's a dark blue background with a light blue plot. All my pgplots have a bright yellow spider cursor. I'll try plotting a white square and see if that can be used as a canvas.
Thanks for you help,
Gary
 
  


Reply

Tags
pgplot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VI Background Text Color mahugl Linux - Newbie 3 12-15-2013 10:12 PM
Change background color - No X tedcreyn Linux - Newbie 9 07-17-2012 11:47 AM
Screen App, Retain BG Color, Background color gets lost duerra Linux - Software 1 07-08-2009 03:01 PM
xterm background color ekdya Fedora 6 09-30-2006 06:48 AM
TTY background color! hitesh_linux Linux - General 1 09-17-2004 06:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration