Search Results

Search found 832 results on 34 pages for 'plot'.

Page 10/34 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Add multiple hist fit to a figure, without the hist

    - by clowny
    Hello, I'm a matlab newbie, and i'd like to superpose some hist fit on a same figure. I know the function histfit, but unfortunatly i can't get to remove the hist and only keep the curve. I guess once i'll know how to do that i'll be able to add several curves using "hold on". Thanx for any answers or advices!

    Read the article

  • Ideas for using R to create a T-shirt design (for useR 2010) ?

    - by Tal Galili
    There is now a competition for creating a T-shirt design for useR2010. Someone proposed the idea to use R for creating the T-shirt image. Which leads me to my questions: What type of images do you think might be fitting for this? How would you suggest to use R to create the images ? Would anyone here want to have a go at it? (p.s: I understand this is not a pure "programming" question. Yet it involves R programming, the understanding of R aesthetics, and some caring for the R community. I also understand I am at the risk of annoying people here with this question, so in case that happens - I deeply apologies! My only justification is that I am acting in good faith and in the purpose of having nice things for R users to enjoy, while learning something in the process) Related thread I once opened: http://stackoverflow.com/questions/2162131/how-can-i-learn-to-create-beautiful-infographics-with-connection-to-my-r-knowled

    Read the article

  • Funny plots in MATLAB

    - by Arkapravo
    I recently learned the ezplot function in MATLAB. Recently I typed in ezplot('x^y - y^x', [-100 100 -100 100]); and this is what I got; Can anyone please tell me whatever is happening ? for lower scaling of x and y ( [ -10 10 -10 10]) there are more patterns in the 2nd 3rd and 4th quadrants. I was not very sure of the shape of curve, but I did not expect this !

    Read the article

  • TypeError when using v 0.8.1 of FLOT library, but no error with v. 0.7

    - by DanielAttard
    I need some help to figure out why I am getting an error when trying to create a simple graph using the jQuery FLOT library. When I reference version 0.7 of the FLOT library, the page renders correctly: http://attardpropertytax.ca/flot07.html But when I switch to version 0.8.1 of the FLOT library, the page returns an error saying: Uncaught TypeError: Cannot read property 'left' of null http://attardpropertytax.ca/flot81.html The HTML is the same for both pages, so I cannot figure out why the new version 0.8.1 of FLOT returns an error, but the old version 0.7 does not. Any ideas? I somehow stumbled across a work-around that managed to fix my problem. I'm nut sure why, but I had to comment-out the following two sections of code from the v. 0.8.1 FLOT library: This was the first spot: // If the grid is visible, add its border width to the offset for (var a in plotOffset) { if(typeof(options.grid.borderWidth) == "object") { plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0; } else { plotOffset[a] += showGrid ? options.grid.borderWidth : 0; } } And this was the second spot: if (isNaN(v) || v < axis.min || v > axis.max // skip those lying on the axes if we got a border || (t == "full" && ((typeof bw == "object" && bw[axis.position] > 0) || bw > 0) && (v == axis.min || v == axis.max))) continue; I'm sure eventually @DNS will be taking a look at this question and maybe he will be able to help me understand what is going wrong with my code. Thanks.

    Read the article

  • How do I save an altered image in matlab?

    - by ef-i-blinky
    So I am using the code located here: http://wwwx.cs.unc.edu/~sjguy/CompVis/Features/BlobDetect.m and I was wondering how to save the final blob detected image. The image that I am doing the blob detection on gets shown and then he manually draws the lines on the image here: Xbar = cx1+X.*cos(alpha)+Y.*sin(alpha); Ybar = cy1+Y.*cos(alpha)-X.*sin(alpha); line(Xbar', Ybar', 'Color', color, 'LineWidth', ln_wid); I then want to save this image using something like imwrite. I have been reading around and it seems that no one really has an answer to to this problem. Thanks for any help you can give me, Josh

    Read the article

  • Drawing a polygon around groups of datapoints in MATLAB

    - by Hossein
    Hi, I have a set of datapoints each of which belongs to a certain cluster(group).I need to draw a polygone around each of these clusters.Does anyone knows how to do it? PS: It doesn't matter if I use or not use the actual datapoints for drawing the polygon. I just need them to be wrapped in a polygon. Thanks

    Read the article

  • Generating a perfectly distributed grid from array

    - by zath
    I'm looking for a formula or rule that will allow me to distribute n characters into a n*n grid with as perfect of a distribution as possible. Let's say we have an array of 5 characters, A through E. Here's an example of how it definitely shouldn't turn out: A B C D E B C D E A C D E A B D E A B C E A B C D The pattern is very clear here, it doesn't look "random". It would look better this way: A B C D E D E A B C B C D E A E A B C D C D E A B What I basically did here was place the A B C D E on the first row, then shift it by 2 on the second row, by 4 on the third row, 1 on the fourth row and 3 on the fifth row. Compared to the very bad example, this one shows no clear pattern. Though I'm certainly hoping there is a pattern, so I can use it to calculate not only small arrays such as this one, but arrays of any size. Any ideas as to how this can be accomplished?

    Read the article

  • Mathematica Plot3D does not produce a plot when graphing a user-defined function?

    - by pythonscript
    I'm writing a simple Mathematica implementation of the black-scholes model and using Plot3D to plot the pricing surface. However, when I run this code, no plot is produced. My call and put functions to produce correct values when run separately, but no plot is produced. Code: Clear[d1, d2, call, put, stockPrice, strikePrice, riskFreeRate, timeToExp, volatility] d1[stockPrice_, strikePrice_, riskFreeRate_, timeToExp_, volatility_] := (Log[stockPrice / strikePrice] + (riskFreeRate + 0.5*volatility^2)*timeToExp) / (volatility * Sqrt[timeToExp]) d2[stockPrice_, strikePrice_, riskFreeRate_, timeToExp_, volatility_] := d1[stockPrice, strikePrice, riskFreeRate, timeToExp, volatility] - volatility*Sqrt[timeToExp] call[stockPrice_, strikePrice_, riskFreeRate_, timeToExp_, volatility_] := stockPrice * CDF[NormalDistribution[0, 1], d1[stockPrice, strikePrice, riskFreeRate, timeToExp, volatility]] - strikePrice * Exp[-riskFreeRate*timeToExp] *CDF[NormalDistribution[0, 1], d2[stockPrice, strikePrice, riskFreeRate, timeToExp, volatility]] Plot3D[call[stockPrice, 500, 0.0030, timeToExp, 0.39], {stockPrice, 10, 1000}, {timetoExp, 0.0833333, 5}] Other plots, like this sample from the reference, do work. Plot3D[{x^2 + y^2, -x^2 - y^2}, {x, -2, 2}, {y, -2, 2}, RegionFunction -> Function[{x, y, z}, x^2 + y^2 <= 4], BoxRatios -> Automatic]

    Read the article

  • How do I plot a STOCK historical graph in android app?

    - by jer
    I wanted to plot a stock historical graph based on google finance in my android app . The problem is I can't find the api for just the stock chart alone and I must try to find another ways to do it. I thought of a way but don't know what whether it works the steps are as follows.. 1) get the details from csv file 2) read the csv file 3) plot the graph using the information of the csv file.(WHICH I DON'T KNOW HOW TO DO IT)! so if my steps above works , I would only want to know how to plot the graph.

    Read the article

  • How to obtain multiple lines in a single density plot, with a corrected scale?

    - by user1677055
    I have recently started working with microarray datasets and am trying to get my hands on R. I wish to make some plots out of my result data, but however I am stuck at the following. I have the following data (myData), cpg samp1 samp2 samp3 cpg1 0.43 0.32 0.21 cpg2 0.43 0.22 1.00 cpg3 0.11 0.99 0.78 cpg4 0.65 0.32 0.12 cpg5 0.11 0.43 0.89 And I wish to obtain a density plot for this, I did the following, plot (density(MyData$samp1), col="red") lines (density(MyData$samp2), col="green") lines (density(MyData$samp3), col="blue") But doing this does not give me correct plots, because not all sample curves fit within the plot limits. I did try looking for answers, but honestly i am still not able to work this out. Can you help me know how do i set my scale for the above? Or what additional should I do to the above code, so that all the curves are in range?? I have got many samples, so i need a something that could also automatically assign a different colour curve for each of my sample, after scaling it right. Thanks in advance..

    Read the article

  • How to put a rgb image on gnuplot 3d plot?

    - by Stefano Borini
    I want to plot an rgb image with gnuplot, and it must be hovering inside a 3d plot box, so that it can act as a "floor" for my data. How can I do it ? THe gnuplot examples use a heatmap to map the rgb values, but this is not what I want. Apart from receiving an error GNUPLOT (plot_image): Color boxes cannot handle RGB components. It is not what I want in any case. I need the full rgb data in the box, not mapped through a heatmap.

    Read the article

  • How to plot image data in PERL on Windows?

    - by angaran
    I would like to plot some image binary data on a grayscale matrix-like graph with custom values on axes. I'm using Perl on a Windows machine but I can't fine the right module to do this. I'm already using GD::Graph to plot other type of data but it seems unsuitable for this specific task.

    Read the article

  • Handwritten linked list is segfaulting and I don't understand why

    - by Born2Smile
    Hi I was working on a bit of fun, making an interface to run gnuplot from within c++, and for some reason the my linked list implementation fails. The code below fails on the line plots-append(&plot). Stepping through the code I discovered that for some reason the destructor ~John() is called immediately after the constructor John(), and I cannot seem to figure out why. The code included below is a stripped down version operating only on Plot*. Originally I made the linked list as a template class. And it worked fine as ll<int and ll<char* but for some reason it fails as ll<Plot*. Could youp please help me figure out why it fails? and perhaps help me understand how to make it work? In advance: Thanks a heap! //B2S #include <string.h class Plot{ char title[80]; public: Plot(){ } }; class Link{ Plot* element; Link* next; Link* prev; friend class ll; }; class ll{ Link* head; Link* tail; public: ll(){ head = tail = new Link(); head-prev = tail-prev = head-next = tail-next = head; } ~ll(){ while (head!=tail){ tail = tail-prev; delete tail-next; } delete head; } void append(Plot* element){ tail-element = element; tail-next = new Link(); tail-next-prev = tail; tail-next = tail; } }; class John{ ll* plots; public: John(){ plots= new ll(); } ~John(){ delete plots; } John(Plot* plot){ John(); plots-append(plot); } }; int main(){ Plot p; John k(&p); }

    Read the article

  • make: invoke command for multiple targets of multiple files?

    - by marvin2k
    Hi, I looking to optimize an existing Makefile. It's used to create multiple plots (using Octave) for every logfile in a given directory using an scriptfile for every plot which takes a logfilename as an argument. In the Moment, I use one single rule for every kind of plot available, with a handwritten call to Octave, giving the specific scriptfile/logfile as an argument. It would be nice, if every plot has "his" octave-script as a dependency (plus the logfile, of course), so only one plot is regenerated if his script is changed. Since I don't want to type that much, I wonder how I can simplifiy this by using only one general rule to build "a" plot? To make it clearer: Logfile: "$(LOGNAME).log" Scriptfile: "plot$(PLOTNAME).m" creates "$(LOGNAME)_$(PLOTNAME).png" The first thing I had in mind: %1_%2.png: %1.log $(OCTAVE) --eval "plot$<2('$<1')" But this seems not to be allowed. Could someone give me a hint?

    Read the article

  • Excel 2007: plot data points not on an axis/ force linear x-incrementation without altering integrity of non-linear data

    - by Ennapode
    In Excel, how does one go about plotting points that don't have an x component that is an x-axis label? For example, in my graph, the x-components are derived from the cosine function and aren't linear, but Excel is displaying them as if .0016 to .0062 to .0135 is an equal incrementation. How would I change this so that the x-axis has an even incrementation without altering the integrity of the points themselves? In other words, how do I plot a point with an x component independent from the x-axis label?

    Read the article

  • How can I plot a radius of all reachable points with pathfinding for a Mob?

    - by PugWrath
    I am designing a tactical turn based game. The maps are 2d, but do have varying level-layers and blocking objects/terrain. I'm looking for an algorithm for pathfinding which will allow me to show an opaque shape representing all of the possible max-distance pixels that a mob can move to, knowing the mob's max pixel distance. Any thoughts on this, or do I just need to write a good pathfinding algorithm and use it to find the cutoff points for any direction in which an obstacle exists?

    Read the article

  • How do I plot individual pixels using the XNA APIs?

    - by izb
    If I wanted to fill my game screen with individually coloured pixels, how would I do this? For example, if I wanted to write a 'game of life'-type game where each pixel was a cell, how would I achieve this using XNA? I've tried just calling SetData() on a Texture2D object using a screen-sized array of Color values, but it complains with: You may not call SetData on a resource while it is actively set on the GraphicsDevice. Unset it from the device before calling SetData. How do I do as it asks? Or better still... is there an alternative, better, efficient way to fill a screen with arbitrary pixels?

    Read the article

  • How can I plot a radius of all reachable points with pathfinding for a Mob (XNA)?

    - by PugWrath
    I am designing a tactical turn based game. The maps are 2d, but do have varying level-layers and blocking objects/terrain. I'm looking for an algorithm for pathfinding which will allow me to show an opaque shape representing all of the possible max-distance pixels that a mob can move to, knowing the mob's max pixel distance. Any thoughts on this, or do I just need to write a good pathfinding algorithm and use it to find the cutoff points for any direction in which an obstacle exists?

    Read the article

  • R: ggplot2, how to add a number of layers to a plot at once to reduce code

    - by John
    library(ggplot2) This code produces a nice looking plot: qplot(cty, hwy, data = mpg, colour = displ) + scale_y_log2() + labs(x="x axis") + labs(y="y axis") + opts(title = "my title") But I want to setup variables to try and to reduce code repetition: log_scale <- scale_y_log2() xscale <- labs(x="x axis") yscale <- labs(y="y axis") title <- opts(title = "my title") my_scales <- c(log_scale, xscale, yscale, title) # make a variable to hold the scale info changes above So that I can do this and add a bunch of things at the same time: qplot(cty, hwy, data = mpg, colour = displ) + my_scales # add these to your plot. but I get this error: Error in object$class : $ operator is invalid for atomic vectors I realize that the things going into my_scales need to be layers / different types of objects, but I don't see what they should be.

    Read the article

  • How do I plot more than one series using qplot?

    - by celenius
    I'm trying to understand how to have more than one series on a plot, using the following data. Year <- c('1950', '1960', '1970', '1980') Bus <- c(10,20,30,40) Bus.sd <- c(1.1, 2.2, 3.3, 4.4) Car <- c(20, 20, 40, 40) Car.sd <- c(1.1, 2.2, 3.3, 4.4) sample_data = data.frame(Year, Bus, Bus.sd, Car, Car.sd) qplot(Year, Bus, data=sample_data, geom="pointrange", ymin = Bus - Bus.sd/2, ymax = Bus + Bus.sd/2) For example, using the above data, how do I show both sample_data$Bus and sample_data$Car on the same plot in different colors? What I tried doing was: p <- qplot(...) then p <- p + qplot(...) where I replicated the previous line, but this gave me an error. I don't fully understand how AES works. I have studied the ggplot2 examples, but have difficulty understanding the relevant examples here.

    Read the article

  • How can I make a group bar plot in ggplot2?

    - by maximusyoda
    I have four of these kind of dataframes each with a different name (Apple,Ball,Cat) with different values of frequency but same 4 season names Seasons Frequency DJF 9886 JJA 5408 MAM 12876 SON 6932 And I am trying to make a group bar plot. The graph I'm looking for is like this, where c,d,e,f will be the names - Apple, Ball, Cat. Y-axis will be Frequency Each group will have 4 bars: DJF,JJA,MAM,SON Filled by seasons The number of Frequency written above the bar plot. How can I format the data to make it suitable for ggplot (cbind, melt etc) and use it in ggplot?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >