473,326 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

plot two data sets on gnuplot


I'm trying to write a script to pass a file of stock prices and volumes,
and plot the results on a gnuplot graph which is non-overlapped graph.

Fig. 1
------------
Fig. 2

Figure 1 is a graph of stock prices, and Figure 2 is a graph of stock volumes,
I'm trying to implement it as following codes,

g = Gnuplot.Gnuplot()
d1=Gnuplot.Data(self.days,self.open,self.high,self .low,self.close,
with='candlestick')
d2=Gnuplot.Data(self.days,self.volume,with='boxes' )
g.plot(d1,d2)

If anyone can get me back on track I'd appreciate it.

--
¡°Orgin : National Taipei University of Technology
Taiwan, Republic of China [redbbs.cc.ntut.edu.tw 140.124.6.202]
¡°FROM : 140.124.6.248
Jul 18 '05 #1
2 5641
>>>>> "¶}¾Ç¤F¶Ü?" == ¶}¾Ç¤F¶Ü? <ca*******@redbbs.cc.ntut.edu.tw> writes:
I'm trying to write a script to pass a file of stock
prices and volumes, and plot the results on a gnuplot
graph which is non-overlapped graph. Fig. 1 ------------ Fig. 2 Figure 1 is a graph of stock prices, and Figure 2 is a
graph of stock volumes, I'm trying to implement it as
following codes,


I don't use gnuplot, but I just wanted to let you know that I recently
added a finance module for matplotlib
http://matplotlib.sourceforge.net that supports the kind of graph you
are trying to make. It's fairly minimalist now, but will grow in the
near future.

Here is a screenshot of a financial chart I made to show off some of
the finance features

http://nitace.bsd.uchicago.edu:8080/...nance_demo.png

If you're interested, you can check out the finance_demo.py example in
the matplotlib src distribution, and if you want to seem more example
code than you find in that dir, email me and I'll send some your way.

Good luck!
John Hunter

Jul 18 '05 #2
John Hunter wrote:
>> <ca*******@redbbs.cc.ntut.edu.tw> writes:

> I'm trying to write a script to pass a file of stock
> prices and volumes, and plot the results on a gnuplot
> graph which is non-overlapped graph.

> Fig. 1 ------------ Fig. 2

> Figure 1 is a graph of stock prices, and Figure 2 is a
> graph of stock volumes, I'm trying to implement it as
> following codes,


I don't use gnuplot, but I just wanted to let you know that I recently
added a finance module for matplotlib
http://matplotlib.sourceforge.net that supports the kind of graph you
are trying to make. It's fairly minimalist now, but will grow in the
near future.

Here is a screenshot of a financial chart I made to show off some of
the finance features

http://nitace.bsd.uchicago.edu:8080/...nance_demo.png


I was going to tell you to look at 'multiplot' in gnuplot:

The command `set multiplot` places `gnuplot` in the multiplot mode, in which
several plots are placed on the same page, window, or screen.

....

But after seeing John's example, I honestly doubt it's worth the hassle with
Gnuplot. It would take a ridiculous amount of work with gnuplot to make that
kind of plot (and I've been using gnuplot since 1991!).

Time for me to finally check out matplotlib...

Best,

f
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Gerrit Holl | last post by:
Hi, I have a dictionairy containing DateTime objects as keys and integers as values. What would be the easiest way to create a simple plot of these, with a number axis versus a time axis? What...
2
by: Evagelia Tsiligianni | last post by:
Hello! I am trying to find a tool that can plot and print (plotted) data. I need it supports plotting dates as well. I 've tried wxPlot and chaco but each of them applies one of my requests...
3
by: Sloan | last post by:
I want to use MFC to plot Sin Wave . How can I do ?
30
by: nephish | last post by:
Hey there, i have tried about every graphing package for python i can get to work on my system. gnuplot, pychart, biggles, gdchart, etc.. (cant get matplot to work) so far, they all are working...
8
by: questions? | last post by:
I want to make a 3d plot. x is a vector(discrete), y is also a vector(discrete), for each pairwise x,y I have a value z(x,y)(it is not a function, just discrete values for each pair of x,y) I...
2
by: Rodrigo Lopez-Negrete | last post by:
Hi all, I'm trying to write a python script using plotting form pylab. Unfortunatelly I've encountered a problem. When I run the script via 'python myscript.py' the plot windows open and close...
3
by: Frank | last post by:
Hi, does anyone know if there is a way to plot a dendrogram with python. Pylab or matplotlib do not provide such a function. Thanks! Frank
2
by: itdevries | last post by:
Hi, I've been looking for a basic c++ 2D plot library to use with windows (and visual studio). I was a bit overwhelmed by all the options I found. Can someone here recommend a basic 2D plot...
6
by: mlt | last post by:
Anyone has an idea to generate points for a solid sphere in C++ that can be plotted with gnuplot? I have tried to plot simple functions based on output from a function written in C++ which worked...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.