How to connect two points with a curved line in GNUplot? - gnuplot

Its basically what the question says. I know that using tikz in latex it would be something like:
\draw[thick,dashed] (0,0) to [out=15,in=165] (1,0)
I would appreciate any help.

I think you have a misunderstanding how lines in gnuplot work. They are always directly connecting points. So you have to ways of faking it:
1) adding additional points and connecting them to "pretend" to have a curved line
2) define a function with the curve you want and plot it over the points (in xrange of point 1 to 2)

What I had to do is to great a .tex file with everything else a needed and then, in the .tex file I add the "\draw[thick,dashed] (0,0) to [out=15,in=165] (1,0)". But I wish I could know how to do it using GNUplot itself.

Related

Add double lines in the middle of another svg line

so I have a drawing program and I need to implement a "broken line", it is an SVG line with two another lines in the middle of this line, these two line needs to cross perpendicularly to the principal line, maybe this picture can help me to explain the problem:
This line can be drawn in any angle that the user choose
I don't really understand svg's so I'm having a lot of trouble implementing this.
Thank you
So I discovered one way to implement that using polylines and calculating the middle of the source and target coordinates, so when it changes I change the middle point too. After that, I created a marker-mid with the double lines.

Trim VLA-OBJECTS Outside Circles automatically without selecting anything

what I want to do is to trim some polylines that are saved as VLA-OBJECTS, there is no problem on converting them into Entities, but what I graphically want is to trim my Image in the following way:
So as you can see I want to trim everything of the blue lines outside the red circles on the corners and I want to it automatically without selecting anything. For this purpose, I have stored the circle as a VLA-OBJECT, The blue polylines as independent VLA-OBJECTS, the centers of the circles, in fact everything on the first image is stored on memory as a VLA-OBJECT. So I was wondering if you can suggest any lisp routine to do it automatically?. I was thinking on using the Break command or the Extend command but I can not find a real solution. Many thanks in advance.
I have no time enought to prepare working sample code, but I may show You the way. I would try to make it in this way:
You can find intersections of circles and lines.
( vlax-invoke-method circle 'IntersectWith BlueLine acExtendNone )
break each blue line by this
(foreach line BlueLines
(command "_break" line pt pt ) ; where pt is point returned by IntersectWith
)
and the last step is to check if all entities created by _break are inside or outside circles.
You don't have easy access to entities created by _break. to get them, You may use (entlast) before command _break. and (entnext) after that .

Make plots inside the WXMaxima GUI

How can I make the plots generated from plotting functions (like plot2d() lie inside the WXMaxima GUI rather than open new Windows? Someone made this in front of me, and I can't find out how he made that.
Thank you.
Just put a "wx" in front of your plot command: use wxplot, wxdraw, wxdraw2d or similar instead of plot, draw or draw2d.

titles next to lines in gnuplot

The feature list for the new version of gnuplot states that "plot title can be placed next to the plot line in the graph proper." This is something I would like to be able to do automatically, but I can't find mention of how to do this in the documentation (probably because it hasn't been written yet). Does anyone know how to do this?
I found the answer in the command line documentation, I assume the pdf hasn't been updated yet. Here's the text:
If you want the title of a plotted line to be placed immediately before or
after that line in the graph itself, use `at {beginning|end}`. This option
may be useful when plotting `with lines` but makes little sense for some
other plot styles.

how to draw objects (rect) from a file

In gnuplot i can draw a rectangle via
set object rect from x0,y0 to x1,y1
How to read the coordinates x0,x1,y0,y1 from a file?
One way would be to put the line of code that sets the rectangle into a separate file and call that file from within the gnuplot script. So you have a file called "coord.txt" that contains the one line
set object rect from 2,2 to 4,40
and you have a gnuplot script called "rect.gp" that says
set title "call rectangle coordinates"
load "coord.txt"
plot x**2
If you now from within gnuplot type load "rect.gp" you get your graph with the rectangle.
That may not be exactly what you are looking for but maybe a first step.
You probably need to store the data from the file into variables, then use these variables to define the locations of objects. The way to do this is not straight as far as I know. Please refer to here. Good luck!

Resources