CN113554730A - Method and device for drawing Nandingger rose diagram - Google Patents

Method and device for drawing Nandingger rose diagram Download PDF

Info

Publication number
CN113554730A
CN113554730A CN202010331989.XA CN202010331989A CN113554730A CN 113554730 A CN113554730 A CN 113554730A CN 202010331989 A CN202010331989 A CN 202010331989A CN 113554730 A CN113554730 A CN 113554730A
Authority
CN
China
Prior art keywords
graph
data
chart
angle
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010331989.XA
Other languages
Chinese (zh)
Inventor
陈志宝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Original Assignee
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Kingsoft Office Software Co Ltd, Guangzhou Kingsoft Mobile Technology Co Ltd filed Critical Zhuhai Kingsoft Office Software Co Ltd
Priority to CN202010331989.XA priority Critical patent/CN113554730A/en
Publication of CN113554730A publication Critical patent/CN113554730A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The method for drawing the Nandingger rose diagram comprises the steps of acquiring data for drawing the diagram and basic parameters for drawing the diagram when a command for drawing the diagram is received; drawing graphs corresponding to each data in the acquired data respectively according to the following modes: determining a graph parameter for drawing a graph corresponding to the data according to the obtained basic parameter for drawing the graph and the value of the data; and drawing a graph corresponding to the data according to the determined graph parameters. The method and the device can automatically draw the Nandingger rose picture, and particularly provide an automatic drawing function for a user in office software.

Description

Method and device for drawing Nandingger rose diagram
Technical Field
The present disclosure relates to computer technologies, and in particular, to a method and an apparatus for drawing a south-buerger rose diagram.
Background
When WPS office or Microsoft office and other office software is used, a Nanogel rose diagram is sometimes required to be made to display the size of a group of data, but the existing tool cannot provide related functions for rapid drawing, a user can only draw manually, the operation is often low in efficiency, and much time is required for the user.
Disclosure of Invention
The application provides a method and a device for drawing a Nandingger rose diagram, which can realize automatic drawing of the Nandingger rose diagram.
The application provides a method for drawing a Nandingger rose diagram, which comprises the following steps: when a command for drawing a chart is received, acquiring data for drawing the chart and basic parameters for drawing the chart; wherein the chart is a Nandinger rose diagram; the basic parameters of the graph include: the total number of data, the maximum value in the data, the chart position coordinate, the size parameter of the chart and the angle parameter of the chart; drawing graphs corresponding to each data in the acquired data respectively according to the following modes: determining a graph parameter for drawing a graph corresponding to the data according to the obtained basic parameter for drawing the graph and the value of the data; wherein the graphic parameters include: excircle dimension parameters, position coordinates, a starting angle and an ending angle. Drawing a graph corresponding to the data according to the determined graph parameters; and the graph corresponding to each acquired data is a sector in the Nanobell rose diagram.
In an exemplary embodiment, the determining, according to the obtained basic parameter for drawing the chart and the value of the data, a graph parameter for drawing a graph corresponding to the data includes one or more of the following operations: determining the excircle size of the graph according to the maximum value of the data, the value of the data and the size parameter of the graph; determining the position coordinate of the graph according to the excircle radius or diameter of the graph and the position coordinate of the graph; and determining the starting angle and the ending angle of the graph according to the angle parameter of the obtained graph, the total number of the data and the sequence number of the data.
In an exemplary embodiment, the dimensional parameters of the chart include an outer circle dimension of the chart; or the size parameters of the chart comprise the size of the outer circle of the chart and the proportion of the inner circle; when the size parameters of the chart comprise the diameter or the radius of the excircle of the chart and the proportion of the inner circle; the determining the graph parameter for drawing the graph corresponding to the data according to the obtained basic parameter for drawing the graph and the value of the data further comprises: and determining the inner circle size parameter of the graph according to the obtained inner circle proportion, the outer circle diameter or radius of the graph and the outer circle radius or diameter of the graph.
In an exemplary embodiment, the angle parameter of the chart comprises a chart total angle; or comprises the following steps: the total angle of the icon and the start angle of the first datum.
In one exemplary embodiment, the method further comprises: respectively determining the color number of each graph filling and the brightness value corresponding to the color number according to the following modes: the color number of any graph adopts the following mode: determining a color number according to the sequence number and the color matching number contained in the color matching scheme, and determining a brightness value corresponding to the color number according to the total number and the sequence number of the data; and respectively displaying the graphs according to the determined color numbers and the determined brightness values.
In one exemplary embodiment, the inner circle dimension parameter of the pattern is calculated using the following formula:
p ═ 0.5- (CP × 0.5 × CR)/R; wherein, CP represents the proportion of the inner circle; CR represents the chart excircle dimension parameter; r represents the excircle size parameter of the graph; p represents the inner circle size parameter of the figure.
In an exemplary embodiment, when the dimensional parameter of the chart comprises an outer circle diameter or radius of the chart; the figure excircle size parameter is calculated by the following formula: r ═ D × CR/maxD; wherein D represents the data corresponding to the graph; maxD represents the maximum value in the data on which the graph is plotted; CR represents the chart excircle dimension parameter; r represents the excircle diameter of the graph; when the size parameters of the chart comprise the diameter or the radius of the excircle of the chart and the proportion of the inner circle; the figure excircle size parameter is calculated by the following formula: r ═ D/([ maxD ] (1-CP)) + maxDxCP) × CR/maxD; wherein D represents the data corresponding to the graph, and CP represents the proportion of the inner circle; maxD represents the maximum value in the data on which the graph is plotted; CR represents the chart excircle dimension parameter; r represents the outer diameter of the figure.
In an exemplary embodiment, the abscissa of the graphic position coordinate is calculated by the following formula: x ═ CR-R)/2+ RX; the ordinate of the figure position coordinate is calculated by the following formula, wherein Y is (CR-R)/2+ RY; wherein CR represents the excircle size parameter of the graph; r represents the excircle size parameter of the graph; RX and RY respectively represent the abscissa and ordinate of the diagram position; x, Y respectively represent the abscissa and ordinate of the position of the pattern.
In an exemplary embodiment, when the angle parameter of the chart includes a chart total angle; the starting angle is calculated using the following formula: SA ═ ((I-1) × CTA)/C-90; the termination angle is calculated using the following formula: EA ═ (I CTA)/C-90; where CTA represents the total angle of the graph; c represents the total number of data; i represents the sequence number of the data; SA represents the starting angle of the graph; an EA end angle; when the angle parameters of the chart comprise the total angle of the chart and the starting angle of the first data; the starting angle is calculated using the following formula: SA ═ ((I-1) × CTA)/C + CSA-90; the termination angle is calculated using the following formula: EA ═ C CTA/C + CSA-90; where CTA represents the total angle of the graph; c represents the total number of data; CSA represents the first data point starting angle; i represents the sequence number of the data; SA represents the starting angle of the graph; EA end angle.
In an exemplary embodiment, the brightness value corresponding to the color number of the graph is determined by the following formula: l ═ 0.4 ^ floor (I ÷ 6))/floor (C ÷ 6) - [ 0.6 ] (folor (I ÷ 6)); wherein C represents the total number of data; i denotes the sequence number of the data.
The application provides a device is drawn to south butyl guer rose diagram includes: the acquisition module is used for acquiring data used for drawing the chart and basic parameters used for drawing the chart when a command for drawing the chart is received; wherein the basic parameters of the graph include: the total number of data, the maximum value in the data, the chart position coordinate, the chart excircle dimension parameter and the chart total angle; a drawing module: the graph corresponding to each data in the acquired data is drawn respectively according to the following modes: determining a graph parameter for drawing a graph corresponding to the data according to the obtained basic parameter for drawing the graph and the value of the data; wherein the graphic parameters include: the excircle dimension parameter, the position coordinate, the starting angle and the ending angle; and drawing a graph corresponding to the data according to the determined graph parameters.
Compared with the related art, the inventor of the application identifies the relation between the basic parameters of the Nandingger diagram and the parameters of each graph in the graph through researching the Nandingger diagram, and therefore the Nandingger rose diagram can be automatically drawn.
The method and the device can determine the parameters of the inner circle, so that a solid Nandingger rose diagram and a hollow Nandingger rose diagram can be drawn, and the method and the device are more diversified.
The method and the device can determine that the form of the Nandingger rose diagram is the whole circumference diagram or not the whole circumference diagram through the total angle degree of the diagram, so that the method and the device are more diversified.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. Other advantages of the present application may be realized and attained by the instrumentalities and combinations particularly pointed out in the specification and the drawings.
Drawings
The accompanying drawings are included to provide an understanding of the present disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the examples serve to explain the principles of the disclosure and not to limit the disclosure.
FIG. 1 is a flow chart of a method for mapping a Nandingger rose in an embodiment of the present application;
FIG. 2 is a partial view of a detailed flow chart of a method for drawing a Nandingell Rose image according to an embodiment of the present disclosure;
FIG. 3 is a partial diagram of a second flowchart of a specific method for drawing a Nandingell Rose chart according to an embodiment of the present invention;
FIG. 4 is a partial diagram of a third flowchart of a specific method for drawing a Nandingell Rose chart according to an embodiment of the present disclosure;
FIG. 5 is a schematic view of the Nandingell Rose of the present application;
FIG. 6 shows an embodiment of the present application with a Nandingell Rose schematic diagram of FIG. two;
FIG. 7 is a schematic diagram of position coordinates in graphical parameters according to an embodiment of the present application;
fig. 8 is a schematic block diagram of a device for drawing a nottingger rose diagram according to an embodiment of the present application.
Detailed Description
The present application describes embodiments, but the description is illustrative rather than limiting and it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are possible. Any feature or element of any embodiment may be used in combination with or instead of any other feature or element in any other embodiment, unless expressly limited otherwise.
The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in this application may also be combined with any conventional features or elements to form a unique inventive concept as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive aspects to form yet another unique inventive aspect, as defined by the claims. Thus, it should be understood that any of the features shown and/or discussed in this application may be implemented alone or in any suitable combination. Accordingly, the embodiments are not limited except as by the appended claims and their equivalents. Furthermore, various modifications and changes may be made within the scope of the appended claims.
Further, in describing representative embodiments, the specification may have presented the method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other orders of steps are possible as will be understood by those of ordinary skill in the art. Therefore, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Further, the claims directed to the method and/or process should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the embodiments of the present application.
As shown in fig. 1, the method for drawing a south eugenol rose chart in the present application includes the following operations:
s1, when a command for drawing a chart is received, acquiring data for drawing the chart and basic parameters for drawing the chart; wherein the chart is a Nandinger rose diagram; the basic parameters of the graph include: the total number of data, the maximum value in the data, the chart position coordinate, the size parameter of the chart and the angle parameter of the chart;
wherein, the total number of the data refers to the number of sector data of the rose in the drawing chart or the number of petal data of the rose;
the position coordinates of the chart refer to the position where the chart is inserted;
the chart excircle dimension parameter refers to the maximum excircle dimension of the chart, and can be the diameter of an excircle or the radius of the excircle;
the proportion of the inner circle is the proportion of a blank circular area in the chart in the excircle of the whole chart;
the start angle of the graph corresponding to the first data is a start angle of the graph corresponding to the data arranged in the first drawing order, and is used for determining the display mode of each graph in the optimal graph or the display mode of the graph desired by the user. The angle can be preset or determined according to parameters input by a user;
the chart total angle is 360 degrees of the entire circumferential arrangement of all the graphs in the guide's tyger rose as shown in figure 3; or not the entire circumference, for example, 270 degrees as shown in fig. 6.
S2, drawing a graph corresponding to each of the acquired data in the following manner:
s21, determining the graph parameters for drawing the graph corresponding to the data according to the obtained basic parameters for drawing the graph and the value of the data; wherein the graphic parameters include: excircle dimension parameters, position coordinates, a starting angle and an ending angle.
S22, drawing the graph corresponding to the data according to the determined graph parameters; and the graph corresponding to each acquired data is a sector in the Nanobell rose diagram.
Wherein, the excircle size parameter refers to the radius or diameter of the top arc of the graph;
the position coordinate is the position coordinate of the upper left corner of the rectangle corresponding to the graph, and is used for determining that the graph is aligned with the centers of all graphs in the graph, as shown in fig. 7;
the starting angle and the ending angle are used for limiting the position and the proportion of the graph in the circumferential direction;
the inner circle size parameter refers to the size of the span from the outer circle to the inner circle, which accounts for the diameter of the outer circle. Generally, the maximum is 0.5 (that is, the size of the inner circle is 0, and the span from the outer circle to the inner circle accounts for all the radiuses of the outer circle, but the numerical value is 0.5, so that the software can be inferred that the size of the inner circle is P × the diameter of the outer circle) and the minimum is 0 (that is, the inner circle is overlapped with the outer circle, and the span from the outer circle to the inner circle is 0).
In an exemplary embodiment, the basic parameters of the chart may be programmed to present a basic parameter setting interface for user input, or may be predefined empirically.
In one exemplary embodiment, the data from which the Nanobule rose is plotted may be user-selected tabular data, such as data obtained in a WPS Office or Microsoft Office form.
As shown in fig. 5 and 6, the south-buerger rose diagram is a graph formed by a plurality of arcs, each data corresponds to a graph, and the graph corresponding to each data is drawn, so that the south-buerger rose diagram is obtained.
In one exemplary embodiment, the graph corresponding to each datum is drawn by selecting the base graph, such as an open arc. And correspondingly modifying each graph parameter of the basic graph according to different data so as to obtain the graph corresponding to each data.
In an exemplary implementation, the determining, in S21, a graph parameter for drawing a graph corresponding to the data according to the obtained basic parameter for drawing the graph and the value of the data includes one or more of the following operations:
operation 1: determining the excircle size of the graph according to the maximum value of the data, the value of the data and the size parameter of the graph;
operation 2: determining the position coordinate of the graph according to the excircle radius or diameter of the graph and the position coordinate of the graph;
operation 3: and determining the starting angle and the ending angle of the graph according to the angle parameter of the obtained graph, the total number of the data and the sequence number of the data.
In one exemplary implementation, the dimensional parameters of the chart include an outer circle dimension of the chart; or the size parameters of the chart comprise the size of the outer circle of the chart and the proportion of the inner circle.
Generally, in the OFFICE program, a circular arc has a diameter equal to the width and height of the circular arc, that is, the diameter is the width and the height of the circular arc, no matter how many degrees the circular arc occupies 360 degrees. Drawing a graph in OFFICE software such as OFFICE software generally does not represent the size of a circular arc by a radius or a diameter, and generally represents the width and the height. The adoption of the outer circle size in the embodiment of the application is convenient for a reader to understand what the size is, and in addition, the reader can understand that the drawn figure is necessarily equal to the height in width (1: 1 in width and height). The R value calculated in the embodiment of the present application can be considered as the diameter, and also the length and width of the sector.
In an exemplary embodiment, when the size parameters of the chart include the diameter or radius of the outer circle of the chart, and the proportion of the inner circle; s21, determining a graph parameter for drawing a graph corresponding to the data according to the obtained basic parameter for drawing the graph and the value of the data, further includes:
and operation 4: and determining the inner circle size parameter of the graph according to the obtained inner circle proportion, the outer circle diameter or radius of the graph and the outer circle radius or diameter of the graph.
In one exemplary implementation, the angle parameter of the chart includes a chart total angle; or comprises the following steps: the total angle of the icon and the start angle of the first datum.
In an exemplary embodiment, when the dimensional parameter of the chart comprises an outer circle diameter or radius of the chart; the figure excircle size parameter is calculated by the following formula:
R=D*CR/maxD
wherein D represents the data corresponding to the graph; maxD represents the maximum value in the data on which the graph is plotted; CR represents the chart excircle dimension parameter; r represents the excircle diameter of the graph;
when the size parameters of the chart comprise the diameter or the radius of the excircle of the chart and the proportion of the inner circle; the figure excircle size parameter is calculated by the following formula:
Figure BDA0002465275330000081
wherein D represents the data corresponding to the graph, and CP represents the proportion of the inner circle; maxD represents the maximum value in the data on which the graph is plotted; CR represents the chart excircle dimension parameter; r represents the outer diameter of the figure.
In an exemplary embodiment, the abscissa of the graphic position coordinate is calculated by the following formula:
Figure BDA0002465275330000082
the ordinate of the graphic position coordinate is calculated by the following formula:
Figure BDA0002465275330000083
wherein CR represents the excircle size parameter of the graph; r represents the excircle size parameter of the graph; RX and RY respectively represent the abscissa and ordinate of the diagram position; x, Y respectively represent the abscissa and ordinate of the position of the pattern.
In an exemplary embodiment, the acquiring data for drawing the chart and the basic parameters for drawing the chart in S1 includes: and determining the position coordinates of the chart according to the position of the table where the data is located. Specifically, the position of the cell may be directly taken as the position of the chart. In other embodiments, the graph position coordinates may be determined based on the cursor position, may be determined by specifying a position in advance, or the like.
In an exemplary embodiment, when the angle parameter of the chart includes a chart total angle;
the starting angle is calculated using the following formula:
Figure BDA0002465275330000091
the termination angle is calculated using the following formula:
Figure BDA0002465275330000092
where CTA represents the total angle of the graph; c represents the total number of data; i represents the sequence number of the data; SA represents the starting angle of the graph; an EA end angle;
when the angle parameters of the chart comprise the total angle of the chart and the starting angle of the first data;
the starting angle is calculated using the following formula:
Figure BDA0002465275330000093
the termination angle is calculated using the following formula:
Figure BDA0002465275330000094
where CTA represents the total angle of the graph; c represents the total number of data; CSA represents the first data point starting angle; i represents the sequence number of the data; SA represents the starting angle of the graph; EA end angle.
In one exemplary embodiment, the inner circle dimension parameter of the pattern is calculated using the following formula:
Figure BDA0002465275330000095
wherein, CP represents the proportion of the inner circle; CR represents the chart excircle dimension parameter; r represents the excircle size parameter of the graph; p represents the inner circle size parameter of the figure.
In an exemplary embodiment, the method further includes S3: and determining the color number of the graphic filling and the brightness value corresponding to the color number.
In an exemplary embodiment, the determining of the color number of the graphic stuffing and the brightness value corresponding to the color number at S3 includes: respectively determining the color number of each graph filling and the brightness value corresponding to the color number according to the following modes: the color number of any graph adopts the following mode:
and determining the color number according to the sequence number and the color matching number contained in the color matching scheme, and determining the brightness value corresponding to the color number according to the total number and the sequence number of the data.
And respectively displaying the graphs according to the determined color numbers and the determined brightness values.
In an exemplary embodiment, the determining the color number according to the sequence number and the color scheme number included in the color scheme, and determining the brightness value corresponding to the color number according to the total number and the sequence number of the data includes:
determining the remainder of the data where the sequence number is equal to the total number of colors left by the color scheme after removing the colors of the text and the background; when the remainder is equal to 0, determining the color matching number corresponding to the graph as the last color matching number in the color matching scheme; when the remainder is not equal to 0, determining the color matching number corresponding to the graph as the sum of the remainder and the basic color;
in an exemplary embodiment, the brightness value corresponding to the color number of the graph is determined by the following formula:
Figure BDA0002465275330000101
wherein C represents the total number of data; i denotes the sequence number of the data.
The embodiment of the invention provides various methods for drawing a Nandinger rose diagram, such as the Nandinger rose diagram without a blank area in the center of FIG. 3, and the Nandinger rose diagram with a blank area of FIG. 6, and further provides a form of 360-degree whole-week arrangement and a form of non-whole-week arrangement, and also provides an arrangement sequence of graphs selected by a user.
When a user needs to draw a solid Nandingger rose diagram, the proportion of the inner circle does not need to be obtained when diagram parameters are obtained; on the contrary, when a hollow Nandingger rose diagram needs to be drawn, the proportion of the inner circle needs to be obtained and the size parameter of the inner circle of each diagram needs to be determined. When a user needs to draw a whole-week or non-whole-week arranged NanDing Gel rose diagram, the total angle of the diagram needs to be set. When a user limits the display position of the graph in the circumferential direction, the start angle of the graph corresponding to the first data of the graph basic parameter needs to be limited.
In an exemplary embodiment, the obtaining data for drawing the chart and the basic parameters for drawing the chart include: storing the acquired data for drawing the chart in a preset array; wherein each data corresponds to an element in the array; determining the total number of the data according to the number of the stored elements; determining a maximum value in the data from the stored maximum values of the elements;
in an exemplary embodiment, the drawing a graph corresponding to each piece of the acquired data includes: and traversing the elements in the array corresponding to each data in the preset array to draw the graph corresponding to each data.
As shown in fig. 2-4, a specific embodiment of the method for drawing a south eugenol rose diagram of the present application:
the method comprises the following steps: starting a chart drawing command according to data selected by a user;
step two: storing the obtained cell area as an array A;
step three: acquiring an abscissa RX and an ordinate RY of the selected cell area;
step four: calculating the number of array elements and assigning the number to a variable C;
step five: calculating the maximum value of the element A of the array, and assigning the maximum value to a variable maxD;
step six: the variable I is assigned to 1;
step seven: and (3) a preset parameter input interface is output, and the user inputs the following parameters: the diameter CR of the outer circle of the graph, the diameter ratio CP of the inner circle of the graph, the initial angle CSA of the first data point, and the total angle degree CTA of the graph
Step eight: traversing each element of the array A and executing the following steps
100: calculating the outer diameter R of the data point of the chart drawn by the currently traversed array element D (hereinafter referred to as the data point D), and adopting the formula:
Figure BDA0002465275330000121
101: calculate data point D abscissa X, formula:
Figure BDA0002465275330000122
103: calculating a data point D ordinate Y, formula:
Figure BDA0002465275330000123
104: drawing a free-form curve S with width and height R at position X, Y (the shape is used as the shape of data point of chart to show the size of data D, hereinafter referred to as S)
105: calculating and setting the adjustment point 1 value SA (i.e. the starting angle of the hollow arc) of S, formula:
Figure BDA0002465275330000124
it is understood that 90 is subtracted from the formula because 0 degree of the hollow arc is the 3-point direction of the clock, and 0 degree is the 0-point direction of the clock in common general knowledge, which is to cater to common general knowledge
106: calculating and setting the adjusting point 2 value EA (namely the end angle of the hollow arc) of S, and calculating the formula:
Figure BDA0002465275330000125
107: calculating and setting a conditional point 3 value P (namely the size of the inner circle of the hollow arc) of S, and adopting the formula:
Figure BDA0002465275330000126
108: judging whether I mod6 is true or not; if yes, calculating and setting the color scheme color number CI to be filled of the S, and adopting the formula: CI is 10; if not, calculating and setting the color number CI of the color scheme to be filled of the S, and adopting the formula: CI — I mod6+ 4;
109: judging whether I/6 is more than 0; if yes, continuing to perform the following steps;
110: calculating and setting the filling color brightness value L of S, and adopting the formula:
Figure BDA0002465275330000131
111: setting the color of the frame of the graph S as a color scheme color number 1;
112: calculating and setting the value of a variable I, and the formula is as follows: i ═ I + 1;
113: the next array element proceeds to step 100.
For example, when the data selected by the user to draw the Nantyger rose is shown in the following table, the results drawn by the above method are shown in the following table:
139 123 159 144 100 148 147 105 146 117 157 136 173 172 140 137 134 126 157 124
the obtained parameters set by the user are as follows: the graph outer circle diameter CR is 400 (unit: pound), the inner circle diameter ratio CP is 0, the first data point starting angle CSA is 0, and the graph total angle degree CTA is 360, and the graph is shown in fig. 5.
And similarly, obtaining parameters set by the user by adopting the data for drawing the Nandingger rose diagram: the diameter CR of the outer circle of the graph is 400 (unit: pound), the diameter ratio CP of the inner circle is 0.3, the initial angle CSA of the first data point is 225, and the total angle degree CTA of the graph is 270; unlike the above parameters, the rendering effect is as shown in fig. 6.
As shown in fig. 8, the device for drawing a south eugenol rose chart of the present application includes:
an obtaining module 10, configured to obtain data used for drawing a chart and basic parameters for drawing the chart when a command for drawing the chart is received; wherein the basic parameters of the graph include: the total number of data, the maximum value in the data, the chart position coordinate, the chart excircle size parameter, the inner circle proportion, the initial angle of the graph corresponding to the first data and the chart total angle;
the drawing module 20: the graph corresponding to each data in the acquired data is drawn respectively according to the following modes:
determining a graph parameter for drawing a graph corresponding to the data according to the obtained basic parameter for drawing the graph and the value of the data; wherein the graphic parameters include: an outer circle dimension parameter, a position coordinate, a start angle, an end angle, and an inner circle dimension parameter.
And drawing a graph corresponding to the data according to the determined graph parameters.
The invention provides a device for drawing a Nandingger rose diagram, which comprises a processor and a memory, wherein the memory stores a program for drawing the Nandingger rose diagram; the processor is used for reading the program for drawing the Nandingger rose diagram and executing the method of any one of the preceding claims
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

Claims (12)

1. A method for drawing a Nandingger rose diagram is characterized by comprising the following steps:
when a command for drawing a chart is received, acquiring data for drawing the chart and basic parameters for drawing the chart; wherein the chart is a Nandinger rose diagram; the basic parameters of the graph include: the total number of data, the maximum value in the data, the chart position coordinate, the size parameter of the chart and the angle parameter of the chart;
drawing graphs corresponding to each data in the acquired data respectively according to the following modes:
determining a graph parameter for drawing a graph corresponding to the data according to the obtained basic parameter for drawing the graph and the value of the data; wherein the graphic parameters include: excircle dimension parameters, position coordinates, an initial angle and a termination angle;
drawing a graph corresponding to the data according to the determined graph parameters;
and the graph corresponding to each acquired data is a sector in the Nanobell rose diagram.
2. The method for drawing the Nandinger rose diagram according to claim 1, wherein the step of determining the graphic parameters for drawing the corresponding graphic of the data according to the obtained basic parameters for drawing the diagram and the value of the data comprises one or more of the following operations:
determining the excircle size of the graph according to the maximum value of the data, the value of the data and the size parameter of the graph;
determining the position coordinate of the graph according to the excircle radius or diameter of the graph and the position coordinate of the graph;
and determining the starting angle and the ending angle of the graph according to the angle parameter of the obtained graph, the total number of the data and the sequence number of the data.
3. The method for mapping a Nandinger rose diagram according to claim 2, wherein the dimensional parameters of the diagram include the outer circle size of the diagram; or the size parameters of the chart comprise the size of the outer circle of the chart and the proportion of the inner circle;
when the size parameters of the chart comprise the diameter or the radius of the excircle of the chart and the proportion of the inner circle;
the determining the graph parameter for drawing the graph corresponding to the data according to the obtained basic parameter for drawing the graph and the value of the data further comprises: and determining the inner circle size parameter of the graph according to the obtained inner circle proportion, the outer circle diameter or radius of the graph and the outer circle radius or diameter of the graph.
4. The method of claim 2, wherein the angle parameter of the graph comprises a total angle of the graph; or comprises the following steps: the total angle of the icon and the start angle of the first datum.
5. The method for mapping a Nandingger rose diagram according to claim 1, further comprising: respectively determining the color number of each graph filling and the brightness value corresponding to the color number according to the following modes:
the color number of any graph adopts the following mode:
determining a color number according to the sequence number and the color matching number contained in the color matching scheme, and determining a brightness value corresponding to the color number according to the total number and the sequence number of the data;
and respectively displaying the graphs according to the determined color numbers and the determined brightness values.
6. The method for drawing a Nandinger rose diagram according to claim 3, wherein the inner circle size parameter of the diagram is calculated by using the following formula:
Figure FDA0002465275320000021
wherein, CP represents the proportion of the inner circle; CR represents the chart excircle dimension parameter; r represents the excircle size parameter of the graph; p represents the inner circle size parameter of the figure.
7. The method for mapping a Nanobell Rose graph according to claim 3, wherein when the size parameter of the graph includes the outer circle diameter or radius of the graph; the figure excircle size parameter is calculated by the following formula:
R=D*CR/maxD
wherein D represents the data corresponding to the graph; maxD represents the maximum value in the data on which the graph is plotted; CR represents the chart excircle dimension parameter; r represents the excircle diameter of the graph;
when the size parameters of the chart comprise the diameter or the radius of the excircle of the chart and the proportion of the inner circle; the figure excircle size parameter is calculated by the following formula:
Figure FDA0002465275320000022
wherein D represents the data corresponding to the graph, and CP represents the proportion of the inner circle; maxD represents the maximum value in the data on which the graph is plotted; CR represents the chart excircle dimension parameter; r represents the outer diameter of the figure.
8. The method for drawing a Nantyger rose diagram according to claim 3, wherein the abscissa of the coordinates of the position of the diagram is calculated by the following formula:
Figure FDA0002465275320000031
the ordinate of the graphic position coordinate is calculated by the following formula:
Figure FDA0002465275320000032
wherein CR represents the excircle size parameter of the graph; r represents the excircle size parameter of the graph; RX and RY respectively represent the abscissa and ordinate of the diagram position; x, Y respectively represent the abscissa and ordinate of the position of the pattern.
9. The method for mapping a Nandinger Rose according to claim 4, wherein when the angle parameter of the chart includes a chart total angle;
the starting angle is calculated using the following formula:
Figure FDA0002465275320000033
the termination angle is calculated using the following formula:
Figure FDA0002465275320000034
where CTA represents the total angle of the graph; c represents the total number of data; i represents the sequence number of the data; SA represents the starting angle of the graph; an EA end angle;
when the angle parameters of the chart comprise the total angle of the chart and the starting angle of the first data;
the starting angle is calculated using the following formula:
Figure FDA0002465275320000041
the termination angle is calculated using the following formula:
Figure FDA0002465275320000042
where CTA represents the total angle of the graph; c represents the total number of data; CSA represents the first data point starting angle; i represents the sequence number of the data; SA represents the starting angle of the graph; EA end angle.
10. The method for drawing a Nandinger rose diagram according to claim 5, wherein the brightness value corresponding to the color number of the graph is determined by using the following formula:
Figure FDA0002465275320000043
wherein C represents the total number of data; i denotes the sequence number of the data.
11. A device for drawing a Nandingger rose diagram is characterized by comprising:
the acquisition module is used for acquiring data used for drawing the chart and basic parameters used for drawing the chart when a command for drawing the chart is received; wherein the basic parameters of the graph include: the total number of data, the maximum value in the data, the chart position coordinate, the chart excircle dimension parameter and the chart total angle;
the drawing module is used for drawing the graph corresponding to each data in the acquired data according to the following modes:
the drawing module is used for determining the graphic parameters for drawing the graph corresponding to the data according to the acquired basic parameters for drawing the graph and the value of the data; wherein the graphic parameters include: the excircle dimension parameter, the position coordinate, the starting angle and the ending angle;
and the drawing module is used for drawing the graph corresponding to the data according to the determined graph parameters.
12. The device for drawing the Nanuger rose diagram is characterized by comprising a processor and a memory, wherein the memory stores a program for drawing the Nanuger rose diagram; the processor is configured to read the program for mapping of a Nanobuel rose diagram, perform the method of any of claims 1-10.
CN202010331989.XA 2020-04-24 2020-04-24 Method and device for drawing Nandingger rose diagram Pending CN113554730A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010331989.XA CN113554730A (en) 2020-04-24 2020-04-24 Method and device for drawing Nandingger rose diagram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010331989.XA CN113554730A (en) 2020-04-24 2020-04-24 Method and device for drawing Nandingger rose diagram

Publications (1)

Publication Number Publication Date
CN113554730A true CN113554730A (en) 2021-10-26

Family

ID=78129620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010331989.XA Pending CN113554730A (en) 2020-04-24 2020-04-24 Method and device for drawing Nandingger rose diagram

Country Status (1)

Country Link
CN (1) CN113554730A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339665A (en) * 2008-08-21 2009-01-07 金蝶软件(中国)有限公司 Method and device for automatically creating radar graph
US20140354648A1 (en) * 2013-05-29 2014-12-04 International Business Machines Corporation Location info-graphics visualizations
CN109656652A (en) * 2018-11-21 2019-04-19 平安科技(深圳)有限公司 Webpage graph making method, apparatus, computer equipment and storage medium
WO2019093455A1 (en) * 2017-11-10 2019-05-16 古野電気株式会社 Nautical chart display device, nautical chart display method, and nautical chart display program
CN110968621A (en) * 2018-09-29 2020-04-07 北京国双科技有限公司 Chart generation method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339665A (en) * 2008-08-21 2009-01-07 金蝶软件(中国)有限公司 Method and device for automatically creating radar graph
US20140354648A1 (en) * 2013-05-29 2014-12-04 International Business Machines Corporation Location info-graphics visualizations
WO2019093455A1 (en) * 2017-11-10 2019-05-16 古野電気株式会社 Nautical chart display device, nautical chart display method, and nautical chart display program
CN110968621A (en) * 2018-09-29 2020-04-07 北京国双科技有限公司 Chart generation method and device
CN109656652A (en) * 2018-11-21 2019-04-19 平安科技(深圳)有限公司 Webpage graph making method, apparatus, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US8823720B2 (en) Methods, systems, and data structures for generating a rasterizer
JP5149288B2 (en) Composition of ANISOMETRIC texture (TEXTURE) (SYNTHESIS)
US9818201B2 (en) Efficient lens re-distortion
CN108648677A (en) Show platen edge display control method, control device and display device
CN110427601B (en) Form processing method and device, intelligent interactive panel and storage medium
WO2009078862A1 (en) Image processing using target values
US8345113B2 (en) Image processing apparatus and image processing system
CN104303226A (en) Method and system for image dithering
CN113554730A (en) Method and device for drawing Nandingger rose diagram
US4811411A (en) Image processing method and system
US10186047B2 (en) Apparatus and method for generating a depth map
US6501479B1 (en) Multi-format vertex data processing apparatus and method
CN115049531A (en) Image rendering method and device, graphic processing equipment and storage medium
CN108429884A (en) A kind of focusing method, device, equipment and medium
CN108629219A (en) A kind of method and device of identification one-dimension code
AU2017204848A1 (en) Projecting rectified images on a surface using uncalibrated devices
CN110097518B (en) Image denoising method and device and terminal equipment
CN113781295A (en) Image processing method, device, equipment and storage medium
US20010054080A1 (en) Extensible storage of network device identification information
CN111815646A (en) Picture processing method and device
CN113553823A (en) Graph alignment method, device and storage medium
CN112835660A (en) Media layer display method, device and system and storage medium
CN117008915B (en) Code compiling method, device and equipment based on register quantity control
CN113553813A (en) Parallelogram parameter adjusting method, device and storage medium
CN109495606B (en) Method and system for preventing serial numbers of multi-channel vehicle-mounted equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination