plot

Plot Histogram with Points Instead of Bars

Here is a question for R-users. I am interested in drawing a histogram with points stacked up, instead of a bar. For example if the data is (1,1,2,1,2,3,3,3,4,4), then I would like to see three points stacked up at 1, 2 points stacked up at 2 and so on. What is the best way to do this in R? ...

How do I create an image matrix with a line drawn in it in MATLAB?

I want to plot a line from one well-defined point to another and then turn it into an image matrix to use a Gaussian filter on it for smoothing. For this I use the functions line and getframe to plot a line and capture the figure window in an image, but getframe is very slow and not very reliable. I noticed that it does not capture anyth...

Finding Zeros Of An Expression

How can I write a program to plot this expression: (a*z^2+c)+(a*z^2-c)*cos(2*u+m*pi)+b*z*sin(2*u+m*pi)=0 Where all of "a","b","c" and "z" parameters are known expressions and are just one variable expressions:"beta". And you is an expression of "lambda", so the main equation is an implicit expression of(lambda and beta). ...

Splitting data into two classes visually in matlab

I have two clusters of data each cluster has x,y (coordinates) and a value to know it's type(1 class1,2 class 2).I have plotted these data but i would like to split these classes with boundary(visually). what is the function to do such thing. i tried contour but it did not help! ...

How to draw vectors (physical 2D/3D vectors) in MATLAB?

I want to know the simplest way to plot vectors in MATLAB. For example: a = [2 3 5]; b = [1 1 0]; c = a + b; I want to visualize this vector addition as head-to-tail/parallelogram method. How do I plot these vectors with an arrow-head? ...

maximum plot points in R?

Hello, I have come across a number of situations where I want to plot more points than I really ought to be -- the main holdup is that when I share my plots with people or embed them in papers, they occupy too much space. It's very straightforward to randomly sample rows in a dataframe. if I want a truly random sample for a point plot...

Grid in an R plot

Is there a command to easily add a grid onto an R plot? ...

What is the best way to visualize large data sets in QT

Hey! I am working on a Qt project, which require visualization of very large data sets (time + value measurements). By very large I mean millions of values. I need to support scrolling across these values and zoom-in/out operations in the time axis. The ultimate zoom-out should show all the data set sub-sampled to match the window widt...

Jquery flot and week numbers

I made a page to plot average snowdepth by week number. Now that we entered 2010, week 1 my graph stretches the interval on the x-axis (yearweek). What I want is the weeknumber on the x-axis (51,52,1,2 etc), and a fixed intervalwidth. Anyone know how to do that? example <script id="source" language="javascript" type="text/javascript"...

to create barchart using jfreechart such that use different background color for a special bar

I want to create barchart using jfreechart such that an special bar's background color can set be set different from the background color of the plot. Is it possible using jfreechart or any other way? Thanks in advance, Abhinav ...

Automatically plot different colored lines in MATLAB

I'm trying to plot several kernel density estimations on the same graph, and I want them to all be different colors. I have a kludged solution using a string 'rgbcmyk' and stepping through it for each separate plot, but I start having duplicates after 7 iterations. Is there an easier/more efficient way to do this, and with more color opt...

How to plot nice graph using few commands, separating drawing logic from layout?

Is there a simple way to make a nice plot of the following data in R, without using many commands? Region1 Region2 2007 17 55 2008 26 43 2009 53 70 2010 96 58 I do know how to plot the data, but it uses too many commands and parameters, and the result still looks absolutely terrible (see here): > test <- read.table("/tmp/data.txt") ...

How to hide zero values in bar3 plot in MATLAB

I've got a 2-D histogram (the plot is 3D - several histograms graphed side by side) that I've generated with the bar3 plot command. However, all the zero values show up as flat squares in the x-y plane. Is there a way I can prevent MATLAB from displaying the values? I already tried replacing all zeros with NaNs, but it didn't change a...

How to draw complement of a network graph?

Any function in that Graphviz which can do that? If not, any other free software that can do that? ...

Most underused data visualization

Histograms and scatterplots are great methods of visualizing data and the relationship between variables, but recently I have been wondering about what visualization techniques I am missing. What do you think is the most underused type of plot? Answers should: Not be very commonly used in practice. Be understandable without a great de...

Using ggplot2 and rpanel together

Has anybody used ggplot2 along with rpanel to produce interactive plots. Here is a piece of code that I adapted from rpanel to plot a Poisson distribution and have a slider to change the parameter value. However, the plot changes too slowly as I change the parameters using the slider. When I change the plot function to use Lattice, it i...

[R] change look-and-feel of plot to resemble hist

I used the information from this post to create a histogram with logarithmic scale: http://stackoverflow.com/questions/1245273/histogram-with-logarithmic-scale However, the output from plot looks nothing like the output from hist. Does anyone know how to configure the output from plot to resemble the output from hist? Thanks for the hel...

Open-source client-side JavaScript-based 2D data plotting?

I'm wondering if there are any 2D graph plotting libraries that run on the client side using JavaScript? The basic idea is that you could put up a plot in a browser and the user can change things like X and Y scales and limits, zooming in and out, without having to constantly reload the web page from the server. The data itself would b...

Creating a Plot Window of a Particular Size

How can I create a new on-screen R plot window with a particular width and height (in pixels, etc.)? ...

legend for group of lines

Hi, I like to plot two groups of lines in the same plot. Each group has two lines with same color and I have to draw them in the order of one group after another group. I try to show legend for groups only not for lines. How can I do this? Here is a simplification of my wrong code: plot(x1, y1, color1); hold on; plot(x2, y2, color1); h...