Forum: PC Hard- und Software GNU-Plot: Zwei Plots mit unterschiedicher Farbe ins selbe Fenster


von TheChosenOne (Gast)


Lesenswert?

Hallo,
ich möchte ein polar-Plot mit GNUPlot machen.
Leider bekomme ich es nicht hin, die beiden Plots ins selbe Fenster mit 
unterschiedlicher Farbe zu setzen. Es klappt immer das eine oder das 
andere.

Weiß jemand warum GNUPlot die Labels übereinander setzt?

GNU-Code:
1
unset border
2
set polar
3
set angles degrees #set gnuplot on degrees instead of radians
4
5
set style line 10 lt 1 lc 0 lw 0.3 #redefine a new line style for the grid
6
7
set grid polar 60 #set the grid to be displayed every 60 degrees
8
set grid ls 10
9
10
set xrange [-60:60] #make gnuplot to go until 6000
11
set yrange [-60:60]
12
13
set xtics axis #disply the xtics on the axis instead of on the border
14
set ytics axis
15
16
set xtics scale 0 #"remove" the tics so that only the y tics are displayed
17
#set xtics ("" 10, "" 20, "" 30, "" 40, "" 50, "" 60) #set the xtics only go from 0 to 6000 with increment of1000 but do not display anything. This has to be done otherwise the grid will not be displayed correctly.
18
set ytics 0, 10, 60 #make the ytics go from the center (0) to 6000 with incrment of 1000
19
20
set size square 
21
22
set key lmargin
23
24
set_label(x, text) = sprintf("set label '%s' at (65*cos(%f)), (65*sin(%f))     center", text, x, x) #this places a label on the outside
25
26
#here all labels are created
27
#eval set_label(0, "0")
28
#eval set_label(60, "60")
29
#eval set_label(120, "120")
30
#eval set_label(180, "180")
31
#eval set_label(240, "240")
32
#eval set_label(330, "300")
33
34
set multiplot
35
36
set style line 11 lt 3 lw 2 pt 2 ps 2 #set the line style for the plot
37
38
#and finally the plot
39
plot "-" u 1:2 t "X-Axis" w lp ls 11
40
0 54
41
30 46,8
42
45 34,7
43
60 22,5
44
90 2,8
45
120 28,5
46
135 37,9
47
150 47,4
48
180 57,3
49
210 51,6
50
225 43,3
51
240 30,2
52
270 3
53
300 25,5
54
315 39,7
55
330 55,7
56
360 54
57
e
58
59
60
#set style line 11 lt 1 lw 2 pt 2 ps 2 #set the line style for the plot
61
#and finally the plot
62
plot "-" u 1:2 t "Y-Axis" w lp ls 11
63
0 2,75
64
30 30,3
65
45 41,2
66
60 52,5
67
90 55,8
68
120 55,7
69
135 43,1
70
150 30,4
71
180 2,74
72
210 24,8
73
225 35,9
74
240 49,3
75
270 59,7
76
300 50,7
77
315 38,9
78
330 26,3
79
360 2,75
80
e

von Uhu U. (uhu)


Lesenswert?

Multiplot und dann mit set origin die Ursprünge der einzelnen Plots 
aufeinander setzen.

Siehe Seite 127 der gnuplot 4.6 Doku.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.