473,657 Members | 2,394 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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='candlesti ck')
d2=Gnuplot.Data (self.days,self .volume,with='b oxes')
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 5670
>>>>> "¶}¾Ç¤F¶Ü?" == ¶}¾Ç¤F¶Ü? <ca*******@redb bs.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*******@redb bs.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
4451
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 library is the most suitable for this? 'plot' on parnassus yields 18 hits, but since I have zero experience, I don't know where to start. What makes it difficult is that I have a time axis instead of a simple integer x-axis. Gnuplot doesn't seem...
2
1905
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 either printing or date plotting. Can anybody help? Thanks Evagelia
3
4618
by: Sloan | last post by:
I want to use MFC to plot Sin Wave . How can I do ?
30
4148
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 ok. I need to make an x y chart for some data that comes in from sensors at different times durring the day. i need it to show the value in the y and the time in the x . no problem so far. But what i cannot get to happen is to scale x (time of the...
8
4783
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 want to show them on a two dimensional plot by showing z(x,y) with colors. Thanks for any hint
2
2659
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 very quickly, or when I added the show() command the shell window was locked until I closed the figures. My question is: is there a way to open those windows in the background without blocking the shell and without running it interactively??
3
6849
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
3323
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 library? I just need to do very basic time series plots and maybe some very elementary diagrams (some lines by specifying x,y coordinates). kind regards, Igor
6
8070
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 fine, but am not sure how to deal with solid object like a sphere from C++.
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.