Code covered by the BSD License  

Highlights from
Qplot

3.75

3.8 | 4 ratings Rate this file 18 Downloads (last 30 days) File Size: 149 KB File ID: #8309
image thumbnail

Qplot

by

 

17 Aug 2005 (Updated )

Menu driven GUI for creating many graph types

| Watch this File

File Information
Description

QPLOT interactive ploting program
Qplot opens a standadr MATLAB figure with three options added to the menu bar: Qfile, Qoptions and Qgraph. Under Qfile you can read data files (text or Excel). Under Qoptions you can set the options of the graph: what columns are the X, the Y and the Z, axis labels, etc. Under Qgraph are the graph types that can be plotted under three categories: 2D, 3D and Stats. By default graphs are typically made with the X or X-Y columns. Any number of subplots can be opened within the figure.

The full list of graphs is:
2D: XY Scatter, XY Line, XY Line with error bar, Horizontal Bar
(grouped), Horizontal Bar (stacked), Vertical Bar (grouped), Vertical Bar (stacked), Vertical Bar with error bars, Histogram, stem, Stairs, Rose, Polar, Compass, Pie

3D: Scatter 3D, Stem 3D, Bar 3D, Waterfall, Ribbon, Grid, surface, Lighted Surface, Contour

Stats: Histogram (yes is repeated), Histogram 3D, Correlation X-Y, Correlation All, QQplot, Normplot.

'Correlation All' produces ouput to the command window. For more details see function 'mcorr' in the File Exchange

Example data files are provided. Both comma separated and Excel

Since I did Qplot for my personal use, there is no really much error checking or messages, so any info on errors will be appreciated. Most errors are because the data selected is not appropriate for the type of graph selected.

MATLAB release MATLAB 7 (R14)
Other requirements Unzip everything to a folder in the MATLAB path, and type: Qplot
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
07 Feb 2011 Bijit Banik

I was trying to plot a graphics of 'c vs X' for different 't'(t1,t2,t3 etc) in the same graph using GUI. Is there anybody to help in doing that?
Thanks in advance !

MY CODE IS:

function varargout = gui_trail(varargin)
% GUI_TRAIL MATLAB code for gui_trail.fig
% GUI_TRAIL, by itself, creates a new GUI_TRAIL or raises the existing
% singleton*.
%
% H = GUI_TRAIL returns the handle to a new GUI_TRAIL or the handle to
% the existing singleton*.
%
% GUI_TRAIL('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in GUI_TRAIL.M with the given input arguments.
%
% GUI_TRAIL('Property','Value',...) creates a new GUI_TRAIL or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before gui_trail_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to gui_trail_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help gui_trail

% Last Modified by GUIDE v2.5 08-Feb-2011 04:15:12

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @gui_trail_OpeningFcn, ...
'gui_OutputFcn', @gui_trail_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before gui_trail is made visible.
function gui_trail_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to gui_trail (see VARARGIN)

% Choose default command line output for gui_trail
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes gui_trail wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = gui_trail_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

function value_x_Callback(hObject, eventdata, handles)
% hObject handle to value_x (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of value_x as text
% str2double(get(hObject,'String')) returns contents of value_x as a double

% --- Executes during object creation, after setting all properties.
function value_x_CreateFcn(hObject, eventdata, handles)
% hObject handle to value_x (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function value_t_Callback(hObject, eventdata, handles)
% hObject handle to value_t (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of value_t as text
% str2double(get(hObject,'String')) returns contents of value_t as a double

% --- Executes during object creation, after setting all properties.
function value_t_CreateFcn(hObject, eventdata, handles)
% hObject handle to value_t (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on button press in draw.
function draw_Callback(hObject, eventdata, handles)
% hObject handle to draw (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

%%% CODE TO EXECUTE PUSH BUTTON %%%

another='Yes';
while strcmp(another,'Yes')
x=str2double(get(handles.value_x,'String'));
t=str2double(get(handles.value_t,'String'));
x=1:x;
c=t*exp(-0.05*x);
figure;
plot(x,c(x));

qstring1='Another calculation?';
another=questdlg(qstring1,'Another calculation?','Yes','No','No');
if strcmp(another,'Yes')
qstring='Draw on same graph?';
dsameG=questdlg(qstring,'Draw on same graph?','Yes','No','No');
else
dsameG='No';
end
if strcmp(dsameG,'Yes')
hold on;
end
end

N.B. Sorry for so long submission !

20 Aug 2009 Athi

Its Very help ful Plotting Program. Thanks a lot.
Keep doing.

20 Aug 2009 Athi  
15 Mar 2008 Jon snow

I am a matlab n00b and need to make a simple 3d surface plot from some profilometer readings, i cant understand this. but thanks anyway

15 Nov 2006 Saiful Bahri

Good

27 Feb 2006 Adisel Montana

This is an excellent program! It reads all text files without any problems (including the names of the columns) all Excel files... of course. It makes graphs really fast and makes almost all Matlab graphs in 2D and 3D. After you have the graphs you click on top of it and you can use all the Matlab tools to manage the graphs (colors, lines, symbols, etc.). If you get an error message it must be because the data you chose to graph is not the one correct for the type of graph you want. You only need to choose correctly the columns that you want to graph. It is a grat tool!

24 Aug 2005 Donald Fredkin

Documentation is needed: "help fplot" provides nothing useful. Every plot made with fplot generated error or warning messages, even when the plot was created. There is a name conflict with a builtin command.

Updates
19 Aug 2005

Bug fix. Read legends.

19 Aug 2005

clearer errobar method

22 Aug 2005

add screen shot

19 Dec 2005

Changed name due to conflict with internal function
Added ability to import Excel files
Added new graph type (bar with errors)
More error messages

27 Feb 2006

Graph now appears within the main program window, instead of in a separate window.
Better text file reading (including no column labels)

28 Oct 2009

Added category STATS to graphs. Improved data reading. Added brief help

29 Oct 2009

Added ability to make subplots
Added smoothing ability of 3D data in table-format

Contact us