LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   creating graphics from file (https://www.linuxquestions.org/questions/linux-software-2/creating-graphics-from-file-711599/)

DeepSeaNautilus 03-20-2009 09:53 AM

color
 
Quote:

Originally Posted by jlinkels (Post 3478803)
Yes you can.

Follow this link: http://www.gnuplot.info/docs/node193.html

All those pages together comprise a wonderful object which is commonly referred to as a manual.

jlinkels

I know how to solve the problem with the labels right now. I know I should read the manual, but the thing is that I have a lot of subjects and homeworks and a little time to do the graphs, that is why I am asking people like you, hoping that they would give me an advice and make it faster and easier for me. Sometimes the manual example doesnt work for some reason. For example, I want to change the output colors of the graph and I am using the example of the manual:
Examples:
set terminal jpeg medium size 640,480 \
xffffff x000000 x404040 \
xff0000 xffa500 x66cdaa xcdb5cd \
xadd8e6 x0000ff xdda0dd x9500d3

But for some reason when I try to plot a graph, it shows only strange text in the terminal, as when you try to open a file with the incorrect program. Do you know how can I solve this?

jlinkels 03-20-2009 10:24 AM

What is the contents of your script file (or what commands have you entered in gnuplot), and what is the contents of the datafile.

What is your gnuplot version?

Have you tried to omit the color settings?

jlinkels

DeepSeaNautilus 03-21-2009 12:20 PM

Quote:

Originally Posted by jlinkels (Post 3482171)
What is the contents of your script file (or what commands have you entered in gnuplot), and what is the contents of the datafile.

What is your gnuplot version?

Have you tried to omit the color settings?

jlinkels

My gnuplot version is:
Code:

        G N U P L O T
        Version 4.2 patchlevel 2
        last modified 31 Aug 2007
        System: Linux 2.6.24-23-generic

I am using the default color settings because I still don't know how to change them. I am using the default terminal wxt.

The content of my script file is:
Code:

unset grid
set grid
unset label
set yrange [0:100]
set xrange [0:10]
set boxwidth 0.5
set bmargin 10

# 'file3' with boxes fs solid 0.75, \

set xtics ("12345678901234567890" 1, "label2" 2, "label3" 3, "label4" 4, "label3" 5, "label3" 6, "label3" 7, "label3" 8, "label3" 9)
set xtics rotate by -60

set label "80" at 0.8,80 font "arial,14" front
set label "70" at 1.8,70 font "arial,14" front
set label "60" at 2.8,60 font "arial,15" front
set label "50" at 3.8,50 font "arial,14" front
set label "40" at 4.8,40 font "arial,14" front
set label "30" at 5.8,30 font "arial,14" front
set label "20" at 6.8,20 font "arial,14" front
set label "35" at 7.8,35 font "arial,14" front
set label "55.4" at 8.8,55.4 font "arial,14" front

plot 'datos.dat' using 1:2 with boxes fs solid 0.5

The content of my data file is:
Code:

1    80
2  70
3  60
4  50
5  40
6  30
7  20
8  35
9  55.4

I would like to change the background color to black, the label colors to white and the area inside the grid to dark gray.I think this is my biggest concern at this moment.

Right now I have a script that reads the data file and then generates the set label instructions and adds them to the gnuplot script file, but I would like to know if is there a better way of putting the value labels, like a command to tell gnuplot to get the string in the second column of the data file to put a label at ( first column, second column) position? I also want put the xtics label names in the datafile's fourth column so I dont have to use the set xtics instruction to put every single label of the xtics, and use an short instruction, such like:
Code:

xtics initial value, increment, end value
. This is not a very important concert right now.

Is there a way I can delete the "datos.dat using 1:2" leyend ?
Thanks in advance

DeepSeaNautilus 03-21-2009 12:36 PM

I have find out how to change the colors of the plot, except for the background color and the grid area. These are my biggest concerns right now, I have searched a lot in google, but I haven't find anything useful.

jlinkels 03-21-2009 11:39 PM

Sorry, but that is unclear to me as well. For X11 it is complicated, and it behaves differently from what I expect. For jpeg types it simply should work but it doesn't.

jlinkels

DeepSeaNautilus 03-22-2009 10:42 AM

Quote:

Originally Posted by jlinkels (Post 3483698)
Sorry, but that is unclear to me as well. For X11 it is complicated, and it behaves differently from what I expect. For jpeg types it simply should work but it doesn't.

jlinkels

Is there any terminal that works correctly? Is there any other terminal that works as we expect, which I could use to set the background color to black, grid area to gray and then convert the output to a jpg image?


All times are GMT -5. The time now is 07:18 PM.