Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1003
| From | T4b <00t4b00@gmail.com> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Aligning Graphs, accurancy problems |
| Date | 2012-03-30 12:47 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <407201de-6965-4986-a2c9-dc140b8df7a7@k24g2000yqe.googlegroups.com> (permalink) |
I'm using gnuplot (version 4.4.4 because it's in the ubuntu repos and
I couldn't get the newer one to compile) to generate a sun dial and
then export it to dxf.
In principle that works, but I have several things which I want to
improve:
-I can't align the graphs properly, I got them to align more or
less right but when looking at the dxf file very closely the origin of
the graphs are still a little off. How do I get all 30 graphs to have
exactly the same origin? (of course I'm not drawing 30 graphs
seperately, I'm using "for")
-When I open the dxf file in a cad program and zoom in very much
some graphs which should look like strechted eights look like polygons
or otherwise wrong. I'm not completely sure that this is not because
of a formula which gives slightly wrong results, but I'm quite sure it
isn't, because it doesn't happen for all the 10 graphs which I draw
with the same formula (iterating through a parameter using for).
-I wonder if there is a trick to get it to scale right? I would
like to be able to have the dxf units be centimeters or millimeters.
The code I use is as follows:
set terminal x11
set angles degrees
set notics
set border 0
set size ratio -1
set notitle
set multiplot
myrange=200
set xrange [-myrange:myrange]
set yrange [-myrange:myrange]
set trange [180:360]
abweichung=50;
breitengrad=47.507912;
laengengrad=7.927561;
von=10;
bis=20;
gnomon=50;
z(stunde)=atan(cos(breitengrad)/( sin(abweichung)*sin(breitengrad)
+cos(abweichung)/tan((stunde-12-((15-laengengrad)*4/60))*15) ) );
sonnendkl(tag)=sin(360*(tag-80)/365.25)*(23+13/30); #richtig
epsilon(winkel)=acos( sin(breitengrad)*cos(winkel)
+cos(breitengrad)*sin(winkel)*sin(abweichung) );
schattenlaenge(tag, winkel)= (gnomon*cos( sonnendkl(tag) )) /
cos( epsilon(winkel) + sonnendkl(tag) );
zeitgleichung(x) =
-7.771*sin((x-1.042)*0.986)-0.068*sin(2*(x-1.042)*0.986)+9.829*sin(2*(x
+10.507)*0.986)-0.229*sin(4*(x+10.507)*0.986) # usage: -zeitgleichung(x
+182.5) # 182.5 isn't exact # in minutes
plot [-50:50] [-50:50] for [stunde=von:bis] -x/tan(z(stunde)) with
lines linetype -1
#Bei Anzeige von MOZ statt MEZ/wasauchimmer muss die Mittagslinie
separat gezeichnet werden:
#set parametric
#plot [-myrange:myrange] 0,t linetype -1
#unset parametric
set polar
plot [180:360] for [tag=365.25/12*5+21:365.25/12*11+21:365.25/12]
schattenlaenge(tag, t-270) linetype -1
set parametric
set trange [0:365]
plot for [stunde=von:bis] z(stunde+(-zeitgleichung(t+182.5))/60)-90,
schattenlaenge(t, z(stunde+(-zeitgleichung(t+182.5))/60) ) linetype -1
unset parametric
unset multiplot
I hope someone can help me. Thanks in advance. :-)
Back to comp.graphics.apps.gnuplot | Previous | Next — Next in thread | Find similar
Aligning Graphs, accurancy problems T4b <00t4b00@gmail.com> - 2012-03-30 12:47 -0700
Re: Aligning Graphs, accurancy problems sfeam <sfeam@users.sourceforge.net> - 2012-04-02 14:46 -0700
Re: Aligning Graphs, accurancy problems T4b <00t4b00@gmail.com> - 2012-04-03 01:34 -0700
Re: Aligning Graphs, accurancy problems sfeam <sfeam@users.sourceforge.net> - 2012-04-03 08:17 -0700
Re: Aligning Graphs, accurancy problems T4b <00t4b00@gmail.com> - 2012-04-03 09:59 -0700
Re: Aligning Graphs, accurancy problems sfeam <sfeam@users.sourceforge.net> - 2012-04-03 10:39 -0700
Re: Aligning Graphs, accurancy problems T4b <00t4b00@gmail.com> - 2012-04-03 12:17 -0700
Re: Aligning Graphs, accurancy problems T4b <00t4b00@gmail.com> - 2012-05-12 09:48 -0700
Re: Aligning Graphs, accurancy problems Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2012-05-15 18:45 +0200
Re: Aligning Graphs, accurancy problems T4b <00t4b00@gmail.com> - 2012-06-11 07:17 -0700
csiph-web